SHOW:
|
|
- or go back to the newest paste.
1 | --//====================================================\\-- | |
2 | --|| CREATED BY BRANNON1964802 | |
3 | --\\====================================================//-- | |
4 | ||
5 | ||
6 | ||
7 | wait(1 / 60) | |
8 | ||
9 | ||
10 | ||
11 | Player = game:GetService("Players").LocalPlayer | |
12 | PlayerGui = Player.PlayerGui | |
13 | Cam = workspace.CurrentCamera | |
14 | Backpack = Player.Backpack | |
15 | Character = Player.Character | |
16 | Humanoid = Character.Humanoid | |
17 | Mouse = Player:GetMouse() | |
18 | RootPart = Character["HumanoidRootPart"] | |
19 | Torso = Character["Torso"] | |
20 | Head = Character["Head"] | |
21 | RightArm = Character["Right Arm"] | |
22 | LeftArm = Character["Left Arm"] | |
23 | RightLeg = Character["Right Leg"] | |
24 | LeftLeg = Character["Left Leg"] | |
25 | RootJoint = RootPart["RootJoint"] | |
26 | Neck = Torso["Neck"] | |
27 | RightShoulder = Torso["Right Shoulder"] | |
28 | LeftShoulder = Torso["Left Shoulder"] | |
29 | RightHip = Torso["Right Hip"] | |
30 | LeftHip = Torso["Left Hip"] | |
31 | ||
32 | IT = Instance.new | |
33 | CF = CFrame.new | |
34 | VT = Vector3.new | |
35 | RAD = math.rad | |
36 | C3 = Color3.new | |
37 | UD2 = UDim2.new | |
38 | BRICKC = BrickColor.new | |
39 | ANGLES = CFrame.Angles | |
40 | EULER = CFrame.fromEulerAnglesXYZ | |
41 | COS = math.cos | |
42 | ACOS = math.acos | |
43 | SIN = math.sin | |
44 | ASIN = math.asin | |
45 | ABS = math.abs | |
46 | MRANDOM = math.random | |
47 | FLOOR = math.floor | |
48 | ||
49 | ||
50 | ||
51 | ||
52 | ||
53 | --//=================================\\ | |
54 | --|| CUSTOMIZATION | |
55 | --\\=================================// | |
56 | ||
57 | Class_Name = "Firebreather" | |
58 | Weapon_Name = "Redemption" | |
59 | ||
60 | Custom_Colors = { | |
61 | Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon. | |
62 | Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon. | |
63 | ||
64 | Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities. | |
65 | Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar. | |
66 | Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar. | |
67 | Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar. | |
68 | Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar. | |
69 | ||
70 | Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar. | |
71 | Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar. | |
72 | Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar. | |
73 | Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar. | |
74 | Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities. | |
75 | } | |
76 | ||
77 | Mana_Bar_Background_Transparency = 0 --Transparency for the background of the mana bar. | |
78 | Secondary_Mana_Bar_Background_Transparency = 0 --Transparency for the background of the secondary mana bar. | |
79 | Health_Bar_Background_Transparency = 0 --Transparency for the background of the health bar. | |
80 | Stun_Bar_Background_Transparency = 0 --Transparency for the background of the stun bar. | |
81 | Ability_Background_Transparency = 0 --Transparency for the background of the abilities. | |
82 | Stat_Background_Transparency = 0 --Transparency for the background of the stats. | |
83 | ||
84 | Player_Size = 1 --Size of the player. | |
85 | Animation_Speed = 2 | |
86 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
87 | ||
88 | Enable_Gui = false --Enables or disables the Weapon Gui. Also functions as hiding or showing the Gui. | |
89 | Enable_Stats = false --Enables or disables stats. | |
90 | Put_Stats_In_Character = false --Places stats in Character. | |
91 | Enable_Stagger_Hit = false --Enables or disables staggering when hitting a hitbox of some sort. | |
92 | Play_Hitbox_Hit_Sound = true --Plays a hit sound when hitting a hitbox of some sort. | |
93 | Enable_Stagger = false --Enables or disables staggering. | |
94 | Enable_Stun = false --Enables or disables the stun mechanic. | |
95 | Enable_Abilities = false --Enables abilites with cooldowns and mana costs. | |
96 | Enable_Secondary_Bar = false --Enables the secondary mana bar, if true. | |
97 | ||
98 | Start_Equipped = false --Starts the player equipped with their weapon. | |
99 | Start_Equipped_With_Equipped_Animation = false --Used in conjunction with the above option. Starts your equip animation. | |
100 | Can_Equip_Or_Unequip = true --Enables or disables the ability to unequip or equip your weapon. | |
101 | Disable_Animator = true --Disables the Animator in the humanoid. | |
102 | Disable_Animate = true --Disables the Animate script in the character. | |
103 | Disable_Moving_Arms = false --Keeps the arms from moving around. | |
104 | Use_Motors_Instead_Of_Welds = false --Uses motors instead of welds to disable moving arms. | |
105 | Walkspeed_Depends_On_Movement_Value = false --Walkspeed depends on movement value. Self-explanatory. | |
106 | Disable_Jump = false --Disables jumping. | |
107 | Use_HopperBin = true --Uses a hopperbin to do things. | |
108 | ||
109 | Cooldown_1 = 0 --Cooldowns for abilites. | |
110 | Cooldown_2 = 0 | |
111 | Cooldown_3 = 0 | |
112 | Cooldown_4 = 0 | |
113 | Skill_1_Mana_Cost = 0 --How much mana is required to use the skill. | |
114 | Skill_2_Mana_Cost = 0 | |
115 | Skill_3_Mana_Cost = 0 | |
116 | Skill_4_Mana_Cost = 0 | |
117 | Max_Mana = 0 --Maximum amount of mana you can have. | |
118 | Max_Secondary_Mana = 0 --Maximum amount of secondary mana you can have. | |
119 | Mana_Name = "Mana" --Name for the mana bar. | |
120 | Secondary_Mana_Name = "Block" --Name for the secondary mana bar. | |
121 | Max_Stun = 1 --Maximum amount of stun you can have. | |
122 | Recover_Mana = 0 --How much mana you gain. | |
123 | Mana_Regen_Mode = "1" --Basically switches from one mana regen system to another. | |
124 | Secondary_Mana_Regen_Mode = "1" --Basically switches from one secondary mana regen system to another. | |
125 | Stun_Lose_Mode = "1" --Basically switches from one secondary stun loss system to another. | |
126 | Recover_Secondary_Mana = 0 --How much secondary mana you gain. | |
127 | Lose_Stun = 0 --How much stun you lose. | |
128 | Stun_Wait = 0 --Delay between losing stun. | |
129 | Mana_Wait = 0 --Delay between gaining mana. | |
130 | Secondary_Mana_Wait = 0 --Delay between gaining secondary mana. | |
131 | Menu_Update_Speed = 0 --How fast the Weapon Gui will update. | |
132 | Constant_Update = false --Removes the delay between updating the Weapon GUI. | |
133 | Show_Stats = false --Hides or shows stats. | |
134 | Stat_Offset = 0.74 --For cosmetic purposes. {0.74, 0.78} | |
135 | ||
136 | --//=================================\\ | |
137 | --|| END OF CUSTOMIZATION | |
138 | --\\=================================// | |
139 | ||
140 | ||
141 | ||
142 | ||
143 | ||
144 | --//=================================\\ | |
145 | --|| USEFUL VALUES | |
146 | --\\=================================// | |
147 | ||
148 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
149 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
150 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
151 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
152 | local CO1 = 0 | |
153 | local CO2 = 0 | |
154 | local CO3 = 0 | |
155 | local CO4 = 0 | |
156 | local CHANGEDEFENSE = 0 | |
157 | local CHANGEDAMAGE = 0 | |
158 | local CHANGEMOVEMENT = 0 | |
159 | local ANIM = "Idle" | |
160 | local ATTACK = false | |
161 | local EQUIPPED = false | |
162 | local HOLD = false | |
163 | local COMBO = 1 | |
164 | local LASTPOINT = nil | |
165 | local BLCF = nil | |
166 | local SCFR = nil | |
167 | local STAGGERHITANIM = false | |
168 | local STAGGERANIM = false | |
169 | local STUNANIM = false | |
170 | local CRITCHANCENUMBER = 0 | |
171 | local IDLENUMBER = 0 | |
172 | local DONUMBER = 0 | |
173 | local HANDIDLE = false | |
174 | local SINE = 0 | |
175 | local CHANGE = 2 / Animation_Speed | |
176 | local WALKINGANIM = false | |
177 | local WALK = 0 | |
178 | local DISABLEJUMPING = false | |
179 | local HASBEENBLOCKED = false | |
180 | local STUNDELAYNUMBER = 0 | |
181 | local MANADELAYNUMBER = 0 | |
182 | local SECONDARYMANADELAYNUMBER = 0 | |
183 | local ROBLOXIDLEANIMATION = IT("Animation") | |
184 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
185 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
186 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
187 | local WEAPONGUI = IT("ScreenGui", nil) | |
188 | WEAPONGUI.Name = "Weapon GUI" | |
189 | local WEAPONTOOL = IT("HopperBin", nil) | |
190 | WEAPONTOOL.Name = Weapon_Name | |
191 | local Weapon = IT("Model") | |
192 | Weapon.Name = Weapon_Name | |
193 | local Effects = IT("Folder", Weapon) | |
194 | Effects.Name = "Effects" | |
195 | local ANIMATOR = Humanoid.Animator | |
196 | local ANIMATE = Character.Animate | |
197 | local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"} | |
198 | local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"} | |
199 | local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"} | |
200 | local HITBLOCKSOUNDS = {"199148933", "199148947"} | |
201 | ||
202 | --//=================================\\ | |
203 | --\\=================================// | |
204 | ||
205 | ||
206 | ||
207 | ||
208 | ||
209 | --//=================================\\ | |
210 | --|| STATS | |
211 | --\\=================================// | |
212 | ||
213 | if Character:FindFirstChild("Stats") ~= nil then | |
214 | Character:FindFirstChild("Stats").Parent = nil | |
215 | end | |
216 | ||
217 | local Stats = IT("Folder", nil) | |
218 | Stats.Name = "Stats" | |
219 | local ChangeStat = IT("Folder", Stats) | |
220 | ChangeStat.Name = "ChangeStat" | |
221 | local Defense = IT("NumberValue", Stats) | |
222 | Defense.Name = "Defense" | |
223 | Defense.Value = 1 | |
224 | local Movement = IT("NumberValue", Stats) | |
225 | Movement.Name = "Movement" | |
226 | Movement.Value = 1 | |
227 | local Damage = IT("NumberValue", Stats) | |
228 | Damage.Name = "Damage" | |
229 | Damage.Value = 1 | |
230 | local Mana = IT("NumberValue", Stats) | |
231 | Mana.Name = "Mana" | |
232 | Mana.Value = 0 | |
233 | local SecondaryMana = IT("NumberValue", Stats) | |
234 | SecondaryMana.Name = "SecondaryMana" | |
235 | SecondaryMana.Value = 0 | |
236 | local CanCrit = IT("BoolValue", Stats) | |
237 | CanCrit.Name = "CanCrit" | |
238 | CanCrit.Value = false | |
239 | local CritChance = IT("NumberValue", Stats) | |
240 | CritChance.Name = "CritChance" | |
241 | CritChance.Value = 20 | |
242 | local CanPenetrateArmor = IT("BoolValue", Stats) | |
243 | CanPenetrateArmor.Name = "CanPenetrateArmor" | |
244 | CanPenetrateArmor.Value = false | |
245 | local AntiTeamKill = IT("BoolValue", Stats) | |
246 | AntiTeamKill.Name = "AntiTeamKill" | |
247 | AntiTeamKill.Value = false | |
248 | local Rooted = IT("BoolValue", Stats) | |
249 | Rooted.Name = "Rooted" | |
250 | Rooted.Value = false | |
251 | local Block = IT("BoolValue", Stats) | |
252 | Block.Name = "Block" | |
253 | Block.Value = false | |
254 | local RecentEnemy = IT("ObjectValue", Stats) | |
255 | RecentEnemy.Name = "RecentEnemy" | |
256 | RecentEnemy.Value = nil | |
257 | local StaggerHit = IT("BoolValue", Stats) | |
258 | StaggerHit.Name = "StaggerHit" | |
259 | StaggerHit.Value = false | |
260 | local Stagger = IT("BoolValue", Stats) | |
261 | Stagger.Name = "Stagger" | |
262 | Stagger.Value = false | |
263 | local Stun = IT("BoolValue", Stats) | |
264 | Stun.Name = "Stun" | |
265 | Stun.Value = false | |
266 | local StunValue = IT("NumberValue", Stats) | |
267 | StunValue.Name = "StunValue" | |
268 | StunValue.Value = 0 | |
269 | ||
270 | if Enable_Stats == true and Put_Stats_In_Character == true then | |
271 | Stats.Parent = Character | |
272 | end | |
273 | ||
274 | --//=================================\\ | |
275 | --\\=================================// | |
276 | ||
277 | ||
278 | ||
279 | ||
280 | ||
281 | --//=================================\\ | |
282 | --|| DEBUFFS / BUFFS | |
283 | --\\=================================// | |
284 | ||
285 | local DEFENSECHANGE1 = IT("NumberValue", ChangeStat) | |
286 | DEFENSECHANGE1.Name = "ChangeDefense" | |
287 | DEFENSECHANGE1.Value = 0 | |
288 | ||
289 | local MOVEMENTCHANGE1 = IT("NumberValue", nil) | |
290 | MOVEMENTCHANGE1.Name = "ChangeMovement" | |
291 | MOVEMENTCHANGE1.Value = 0 | |
292 | ||
293 | --//=================================\\ | |
294 | --\\=================================// | |
295 | ||
296 | ||
297 | ||
298 | ||
299 | ||
300 | --//=================================\\ | |
301 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
302 | --\\=================================// | |
303 | ||
304 | ArtificialHB = Instance.new("BindableEvent", script) | |
305 | ArtificialHB.Name = "ArtificialHB" | |
306 | ||
307 | script:WaitForChild("ArtificialHB") | |
308 | ||
309 | frame = Frame_Speed | |
310 | tf = 0 | |
311 | allowframeloss = false | |
312 | tossremainder = false | |
313 | lastframe = tick() | |
314 | script.ArtificialHB:Fire() | |
315 | ||
316 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
317 | tf = tf + s | |
318 | if tf >= frame then | |
319 | if allowframeloss then | |
320 | script.ArtificialHB:Fire() | |
321 | lastframe = tick() | |
322 | else | |
323 | for i = 1, math.floor(tf / frame) do | |
324 | script.ArtificialHB:Fire() | |
325 | end | |
326 | lastframe = tick() | |
327 | end | |
328 | if tossremainder then | |
329 | tf = 0 | |
330 | else | |
331 | tf = tf - frame * math.floor(tf / frame) | |
332 | end | |
333 | end | |
334 | end) | |
335 | ||
336 | --//=================================\\ | |
337 | --\\=================================// | |
338 | ||
339 | ||
340 | ||
341 | ||
342 | ||
343 | --//=================================\\ | |
344 | --|| SOME FUNCTIONS | |
345 | --\\=================================// | |
346 | ||
347 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
348 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
349 | end | |
350 | ||
351 | function PositiveAngle(NUMBER) | |
352 | if NUMBER >= 0 then | |
353 | NUMBER = 0 | |
354 | end | |
355 | return NUMBER | |
356 | end | |
357 | ||
358 | function NegativeAngle(NUMBER) | |
359 | if NUMBER <= 0 then | |
360 | NUMBER = 0 | |
361 | end | |
362 | return NUMBER | |
363 | end | |
364 | ||
365 | function Swait(NUMBER) | |
366 | if NUMBER == 0 or NUMBER == nil then | |
367 | ArtificialHB.Event:wait() | |
368 | else | |
369 | for i = 1, NUMBER do | |
370 | ArtificialHB.Event:wait() | |
371 | end | |
372 | end | |
373 | end | |
374 | ||
375 | function QuaternionFromCFrame(cf) | |
376 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
377 | local trace = m00 + m11 + m22 | |
378 | if trace > 0 then | |
379 | local s = math.sqrt(1 + trace) | |
380 | local recip = 0.5 / s | |
381 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
382 | else | |
383 | local i = 0 | |
384 | if m11 > m00 then | |
385 | i = 1 | |
386 | end | |
387 | if m22 > (i == 0 and m00 or m11) then | |
388 | i = 2 | |
389 | end | |
390 | if i == 0 then | |
391 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
392 | local recip = 0.5 / s | |
393 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
394 | elseif i == 1 then | |
395 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
396 | local recip = 0.5 / s | |
397 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
398 | elseif i == 2 then | |
399 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
400 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
401 | end | |
402 | end | |
403 | end | |
404 | ||
405 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
406 | local xs, ys, zs = x + x, y + y, z + z | |
407 | local wx, wy, wz = w * xs, w * ys, w * zs | |
408 | local xx = x * xs | |
409 | local xy = x * ys | |
410 | local xz = x * zs | |
411 | local yy = y * ys | |
412 | local yz = y * zs | |
413 | local zz = z * zs | |
414 | 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)) | |
415 | end | |
416 | ||
417 | function QuaternionSlerp(a, b, t) | |
418 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
419 | local startInterp, finishInterp; | |
420 | if cosTheta >= 0.0001 then | |
421 | if (1 - cosTheta) > 0.0001 then | |
422 | local theta = ACOS(cosTheta) | |
423 | local invSinTheta = 1 / SIN(theta) | |
424 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
425 | finishInterp = SIN(t * theta) * invSinTheta | |
426 | else | |
427 | startInterp = 1 - t | |
428 | finishInterp = t | |
429 | end | |
430 | else | |
431 | if (1 + cosTheta) > 0.0001 then | |
432 | local theta = ACOS(-cosTheta) | |
433 | local invSinTheta = 1 / SIN(theta) | |
434 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
435 | finishInterp = SIN(t * theta) * invSinTheta | |
436 | else | |
437 | startInterp = t - 1 | |
438 | finishInterp = t | |
439 | end | |
440 | end | |
441 | 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 | |
442 | end | |
443 | ||
444 | function Clerp(a, b, t) | |
445 | local qa = {QuaternionFromCFrame(a)} | |
446 | local qb = {QuaternionFromCFrame(b)} | |
447 | local ax, ay, az = a.x, a.y, a.z | |
448 | local bx, by, bz = b.x, b.y, b.z | |
449 | local _t = 1 - t | |
450 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
451 | end | |
452 | ||
453 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
454 | local frame = IT("Frame") | |
455 | frame.BackgroundTransparency = TRANSPARENCY | |
456 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
457 | frame.Position = POSITION | |
458 | frame.Size = SIZE | |
459 | frame.BackgroundColor3 = COLOR | |
460 | frame.BorderColor3 = BORDERCOLOR | |
461 | frame.Name = NAME | |
462 | frame.Parent = PARENT | |
463 | return frame | |
464 | end | |
465 | ||
466 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
467 | local label = IT("TextLabel") | |
468 | label.BackgroundTransparency = 1 | |
469 | label.Size = UD2(1, 0, 1, 0) | |
470 | label.Position = UD2(0, 0, 0, 0) | |
471 | label.TextColor3 = C3(255, 255, 255) | |
472 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
473 | label.TextTransparency = TRANSPARENCY | |
474 | label.FontSize = TEXTFONTSIZE | |
475 | label.Font = TEXTFONT | |
476 | label.BorderSizePixel = BORDERSIZEPIXEL | |
477 | label.TextScaled = true | |
478 | label.Text = TEXT | |
479 | label.Name = NAME | |
480 | label.Parent = PARENT | |
481 | return label | |
482 | end | |
483 | ||
484 | function NoOutlines(PART) | |
485 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
486 | end | |
487 | ||
488 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE) | |
489 | local NEWPART = IT("Part") | |
490 | NEWPART.formFactor = FORMFACTOR | |
491 | NEWPART.Reflectance = REFLECTANCE | |
492 | NEWPART.Transparency = TRANSPARENCY | |
493 | NEWPART.CanCollide = false | |
494 | NEWPART.Locked = true | |
495 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
496 | NEWPART.Name = NAME | |
497 | NEWPART.Size = SIZE | |
498 | NEWPART.Position = Torso.Position | |
499 | NoOutlines(NEWPART) | |
500 | NEWPART.Material = MATERIAL | |
501 | NEWPART:BreakJoints() | |
502 | NEWPART.Parent = PARENT | |
503 | return NEWPART | |
504 | end | |
505 | ||
506 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
507 | local NEWMESH = IT(MESH) | |
508 | if MESH == "SpecialMesh" then | |
509 | NEWMESH.MeshType = MESHTYPE | |
510 | if MESHID ~= "nil" and MESHID ~= "" then | |
511 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
512 | end | |
513 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
514 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
515 | end | |
516 | end | |
517 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
518 | NEWMESH.Scale = SCALE | |
519 | NEWMESH.Parent = PARENT | |
520 | return NEWMESH | |
521 | end | |
522 | ||
523 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
524 | local NEWWELD = IT(TYPE) | |
525 | NEWWELD.Part0 = PART0 | |
526 | NEWWELD.Part1 = PART1 | |
527 | NEWWELD.C0 = C0 | |
528 | NEWWELD.C1 = C1 | |
529 | NEWWELD.Parent = PARENT | |
530 | return NEWWELD | |
531 | end | |
532 | ||
533 | function CreateSound(ID, PARENT, VOLUME, PITCH) | |
534 | coroutine.resume(coroutine.create(function() | |
535 | local NEWSOUND = IT("Sound", PARENT) | |
536 | NEWSOUND.Volume = VOLUME | |
537 | NEWSOUND.Pitch = PITCH | |
538 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
539 | Swait() | |
540 | NEWSOUND:play() | |
541 | game:GetService("Debris"):AddItem(NEWSOUND, 10) | |
542 | end)) | |
543 | end | |
544 | ||
545 | function CFrameFromTopBack(at, top, back) | |
546 | local right = top:Cross(back) | |
547 | 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) | |
548 | end | |
549 | ||
550 | function Lightning(POSITION1, POSITION2, MULTIPLIERTIME, LIGHTNINGDELAY, OFFSET, BRICKCOLOR, MATERIAL, SIZE, TRANSPARENCY, LASTINGTIME) | |
551 | local MAGNITUDE = (POSITION1 - POSITION2).magnitude | |
552 | local CURRENTPOSITION = POSITION1 | |
553 | local LIGHTNINGOFFSET = {-OFFSET, OFFSET} | |
554 | coroutine.resume(coroutine.create(function() | |
555 | for i = 1, MULTIPLIERTIME do | |
556 | local LIGHTNINGPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR,"Effect", VT(SIZE * Player_Size, SIZE * Player_Size, MAGNITUDE / MULTIPLIERTIME)) | |
557 | LIGHTNINGPART.Anchored = true | |
558 | local LIGHTNINGOFFSET2 = VT(LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)]) | |
559 | local LIGHTNINGPOSITION1 = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME).p + LIGHTNINGOFFSET2 | |
560 | if MULTIPLIERTIME == i then | |
561 | local LIGHTNINGMAGNITUDE1 = (CURRENTPOSITION - POSITION2).magnitude | |
562 | LIGHTNINGPART.Size = VT(SIZE * Player_Size, SIZE * Player_Size, LIGHTNINGMAGNITUDE1) | |
563 | LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, -LIGHTNINGMAGNITUDE1 / 2) | |
564 | else | |
565 | LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, LIGHTNINGPOSITION1) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2) | |
566 | end | |
567 | CURRENTPOSITION=LIGHTNINGPART.CFrame * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2).p | |
568 | game.Debris:AddItem(LIGHTNINGPART, LASTINGTIME) | |
569 | coroutine.resume(coroutine.create(function() | |
570 | while LIGHTNINGPART.Transparency ~= 1 do | |
571 | --local StartTransparency = tra | |
572 | for i=0, 1, LASTINGTIME do | |
573 | Swait() | |
574 | LIGHTNINGPART.Transparency = LIGHTNINGPART.Transparency + (0.1 / LASTINGTIME) | |
575 | end | |
576 | end | |
577 | end)) | |
578 | Swait(LIGHTNINGDELAY / Animation_Speed) | |
579 | end | |
580 | end)) | |
581 | end | |
582 | ||
583 | function MagicBlock(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
584 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
585 | EFFECTPART.Anchored = true | |
586 | EFFECTPART.CFrame = CFRAME | |
587 | local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
588 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
589 | coroutine.resume(coroutine.create(function(PART, MESH) | |
590 | for i = 0, 1, delay do | |
591 | Swait() | |
592 | PART.CFrame = PART.CFrame * ROTATION | |
593 | PART.Transparency = i | |
594 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
595 | end | |
596 | PART.Parent = nil | |
597 | end), EFFECTPART, EFFECTMESH) | |
598 | end | |
599 | ||
600 | function MagicSphere(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
601 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
602 | EFFECTPART.Anchored = true | |
603 | EFFECTPART.CFrame = CFRAME | |
604 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Sphere", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
605 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
606 | coroutine.resume(coroutine.create(function(PART, MESH) | |
607 | for i = 0, 1, delay do | |
608 | Swait() | |
609 | PART.CFrame = PART.CFrame * ROTATION | |
610 | PART.Transparency = i | |
611 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
612 | end | |
613 | PART.Parent = nil | |
614 | end), EFFECTPART, EFFECTMESH) | |
615 | end | |
616 | ||
617 | function MagicCylinder(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
618 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
619 | EFFECTPART.Anchored = true | |
620 | EFFECTPART.CFrame = CFRAME | |
621 | local EFFECTMESH = CreateMesh("CylinderMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
622 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
623 | coroutine.resume(coroutine.create(function(PART, MESH) | |
624 | for i = 0, 1, delay do | |
625 | Swait() | |
626 | PART.CFrame = PART.CFrame * ROTATION | |
627 | PART.Transparency = i | |
628 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
629 | end | |
630 | PART.Parent = nil | |
631 | end), EFFECTPART, EFFECTMESH) | |
632 | end | |
633 | ||
634 | function MagicHead(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
635 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
636 | EFFECTPART.Anchored = true | |
637 | EFFECTPART.CFrame = CFRAME | |
638 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Head", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
639 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
640 | coroutine.resume(coroutine.create(function(PART, MESH) | |
641 | for i = 0, 1, delay do | |
642 | Swait() | |
643 | PART.CFrame = PART.CFrame * ROTATION | |
644 | PART.Transparency = i | |
645 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
646 | end | |
647 | PART.Parent = nil | |
648 | end), EFFECTPART, EFFECTMESH) | |
649 | end | |
650 | ||
651 | function MagicRing(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
652 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
653 | EFFECTPART.Anchored = true | |
654 | EFFECTPART.CFrame = CFRAME | |
655 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "3270017", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
656 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
657 | coroutine.resume(coroutine.create(function(PART, MESH) | |
658 | for i = 0, 1, delay do | |
659 | Swait() | |
660 | PART.CFrame = PART.CFrame * ROTATION | |
661 | PART.Transparency = i | |
662 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
663 | end | |
664 | PART.Parent = nil | |
665 | end), EFFECTPART, EFFECTMESH) | |
666 | end | |
667 | ||
668 | function MagicWave(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
669 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
670 | EFFECTPART.Anchored = true | |
671 | EFFECTPART.CFrame = CFRAME | |
672 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "20329976", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), VT(0, 0, (-0.1 * Z1)) + (OFFSET * Player_Size)) | |
673 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
674 | coroutine.resume(coroutine.create(function(PART, MESH) | |
675 | for i = 0, 1, delay do | |
676 | Swait() | |
677 | PART.CFrame = PART.CFrame * ROTATION | |
678 | PART.Transparency = i | |
679 | MESH.Offset = VT(0, 0, (-0.1 * MESH.Scale.Z)) | |
680 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
681 | end | |
682 | PART.Parent = nil | |
683 | end), EFFECTPART, EFFECTMESH) | |
684 | end | |
685 | ||
686 | function MagicCrystal(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
687 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
688 | EFFECTPART.Anchored = true | |
689 | EFFECTPART.CFrame = CFRAME | |
690 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "9756362", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
691 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
692 | coroutine.resume(coroutine.create(function(PART, MESH) | |
693 | for i = 0, 1, delay do | |
694 | Swait() | |
695 | PART.CFrame = PART.CFrame * ROTATION | |
696 | PART.Transparency = i | |
697 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
698 | end | |
699 | PART.Parent = nil | |
700 | end), EFFECTPART, EFFECTMESH) | |
701 | end | |
702 | ||
703 | function MagicSwirl(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
704 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
705 | EFFECTPART.Anchored = true | |
706 | EFFECTPART.CFrame = CFRAME | |
707 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1051557", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
708 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
709 | coroutine.resume(coroutine.create(function(PART, MESH) | |
710 | for i = 0, 1, delay do | |
711 | Swait() | |
712 | PART.CFrame = PART.CFrame * ROTATION | |
713 | PART.Transparency = i | |
714 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
715 | end | |
716 | PART.Parent = nil | |
717 | end), EFFECTPART, EFFECTMESH) | |
718 | end | |
719 | ||
720 | function MagicSharpCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
721 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
722 | EFFECTPART.Anchored = true | |
723 | EFFECTPART.CFrame = CFRAME | |
724 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1778999", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
725 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
726 | coroutine.resume(coroutine.create(function(PART, MESH) | |
727 | for i = 0, 1, delay do | |
728 | Swait() | |
729 | PART.CFrame = PART.CFrame * ROTATION | |
730 | PART.Transparency = i | |
731 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
732 | end | |
733 | PART.Parent = nil | |
734 | end), EFFECTPART, EFFECTMESH) | |
735 | end | |
736 | ||
737 | function MagicFlatCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
738 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
739 | EFFECTPART.Anchored = true | |
740 | EFFECTPART.CFrame = CFRAME | |
741 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1033714", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
742 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
743 | coroutine.resume(coroutine.create(function(PART, MESH) | |
744 | for i = 0, 1, delay do | |
745 | Swait() | |
746 | PART.CFrame = PART.CFrame * ROTATION | |
747 | PART.Transparency = i | |
748 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
749 | end | |
750 | PART.Parent = nil | |
751 | end), EFFECTPART, EFFECTMESH) | |
752 | end | |
753 | ||
754 | function MagicSpikedCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
755 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
756 | EFFECTPART.Anchored = true | |
757 | EFFECTPART.CFrame = CFRAME | |
758 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1323306", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
759 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
760 | coroutine.resume(coroutine.create(function(PART, MESH) | |
761 | for i = 0, 1, delay do | |
762 | Swait() | |
763 | PART.CFrame = PART.CFrame * ROTATION | |
764 | PART.Transparency = i | |
765 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
766 | end | |
767 | PART.Parent = nil | |
768 | end), EFFECTPART, EFFECTMESH) | |
769 | end | |
770 | ||
771 | function MagicFlatCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
772 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
773 | EFFECTPART.Anchored = true | |
774 | EFFECTPART.CFrame = CFRAME | |
775 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1078075", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
776 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
777 | coroutine.resume(coroutine.create(function(PART, MESH) | |
778 | for i = 0, 1, delay do | |
779 | Swait() | |
780 | PART.CFrame = PART.CFrame * ROTATION | |
781 | PART.Transparency = i | |
782 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
783 | end | |
784 | PART.Parent = nil | |
785 | end), EFFECTPART, EFFECTMESH) | |
786 | end | |
787 | ||
788 | function MagicSkull(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
789 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
790 | EFFECTPART.Anchored = true | |
791 | EFFECTPART.CFrame = CFRAME | |
792 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
793 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
794 | coroutine.resume(coroutine.create(function(PART, MESH) | |
795 | for i = 0, 1, delay do | |
796 | Swait() | |
797 | PART.CFrame = PART.CFrame * ROTATION | |
798 | PART.Transparency = i | |
799 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
800 | end | |
801 | PART.Parent = nil | |
802 | end), EFFECTPART, EFFECTMESH) | |
803 | end | |
804 | ||
805 | function ElectricEffect(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X, Y, Z, delay) | |
806 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
807 | EFFECTPART.Anchored = true | |
808 | EFFECTPART.CFrame = CFRAME | |
809 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X * Player_Size, Y * Player_Size, Z * Player_Size), OFFSET * Player_Size) | |
810 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
811 | local XVALUE = MRANDOM() | |
812 | local YVALUE = MRANDOM() | |
813 | local ZVALUE = MRANDOM() | |
814 | coroutine.resume(coroutine.create(function(PART, MESH, THEXVALUE, THEYVALUE, THEZVALUE) | |
815 | for i = 0, 1, delay do | |
816 | Swait() | |
817 | PART.CFrame = PART.CFrame * ROTATION | |
818 | PART.Transparency = i | |
819 | THEXVALUE = THEXVALUE - 0.1 * (delay * 10) | |
820 | THEYVALUE = THEYVALUE - 0.1 * (delay * 10) | |
821 | THEZVALUE = THEZVALUE - 0.1 * (delay * 10) | |
822 | MESH.Scale = MESH.Scale + VT(THEXVALUE * Player_Size, THEYVALUE * Player_Size, THEZVALUE * Player_Size) | |
823 | end | |
824 | PART.Parent = nil | |
825 | end), EFFECTPART, EFFECTMESH, XVALUE, YVALUE, ZVALUE) | |
826 | end | |
827 | ||
828 | function TrailEffect(BRICKCOLOR, MATERIAL, CURRENTCFRAME, OLDCFRAME, MESHTYPE, REFLECTANCE, SIZE, ROTATION, X, Y, Z, delay) | |
829 | local MAGNITUDECFRAME = (CURRENTCFRAME.p - OLDCFRAME.p).magnitude | |
830 | if MAGNITUDECFRAME > (1 / 100) then | |
831 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT(1, MAGNITUDECFRAME, 1)) | |
832 | EFFECTPART.Anchored = true | |
833 | EFFECTPART.CFrame = CF((CURRENTCFRAME.p + OLDCFRAME.p) / 2, OLDCFRAME.p) * ANGLES(RAD(90), 0, 0) | |
834 | local THEMESHTYPE = "BlockMesh" | |
835 | if MESHTYPE == "Cylinder" then | |
836 | THEMESHTYPE = "CylinderMesh" | |
837 | end | |
838 | local EFFECTMESH = CreateMesh(THEMESHTYPE, EFFECTPART, "", "", "", VT(0 + SIZE * Player_Size, 1, 0 + SIZE * Player_Size), VT(0, 0, 0)) | |
839 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
840 | coroutine.resume(coroutine.create(function(PART, MESH) | |
841 | for i = 0, 1, delay do | |
842 | Swait() | |
843 | PART.CFrame = PART.CFrame * ROTATION | |
844 | PART.Transparency = i | |
845 | MESH.Scale = MESH.Scale + VT(X * Player_Size, Y * Player_Size, Z * Player_Size) | |
846 | end | |
847 | PART.Parent = nil | |
848 | end), EFFECTPART, EFFECTMESH) | |
849 | end | |
850 | end | |
851 | ||
852 | function ClangEffect(BRICKCOLOR, MATERIAL, CFRAME, ANGLE, DURATION, SIZE, POWER, REFLECTANCE, X, Y, Z, delay) | |
853 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 1, BRICKCOLOR, "Effect", VT()) | |
854 | EFFECTPART.Anchored = true | |
855 | EFFECTPART.CFrame = CFRAME | |
856 | local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(0, 0, 0), VT(0, 0, 0)) | |
857 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
858 | local THELASTPOINT = CFRAME | |
859 | coroutine.resume(coroutine.create(function(PART) | |
860 | for i = 1, DURATION do | |
861 | Swait() | |
862 | PART.CFrame = PART.CFrame * ANGLES(RAD(ANGLE), 0, 0) * CF(0, POWER * Player_Size, 0) | |
863 | TrailEffect(BRICKCOLOR, MATERIAL, PART.CFrame, THELASTPOINT, "Cylinder", REFLECTANCE, SIZE * Player_Size, ANGLES(0, 0, 0), X * Player_Size, Y * Player_Size, Z * Player_Size, delay) | |
864 | THELASTPOINT = PART.CFrame | |
865 | end | |
866 | PART.Parent = nil | |
867 | end), EFFECTPART) | |
868 | end | |
869 | ||
870 | --local list={} | |
871 | function Triangle(Color, Material, a, b, c, delay) | |
872 | local edge1 = (c - a):Dot((b - a).unit) | |
873 | local edge2 = (a - b):Dot((c - b).unit) | |
874 | local edge3 = (b - c):Dot((a - c).unit) | |
875 | if edge1 <= (b - a).magnitude and edge1 >= 0 then | |
876 | a, b, c=a, b, c | |
877 | elseif edge2 <= (c - b).magnitude and edge2 >= 0 then | |
878 | a, b, c=b, c, a | |
879 | elseif edge3 <= (a - c).magnitude and edge3 >= 0 then | |
880 | a, b, c=c, a, b | |
881 | else | |
882 | assert(false, "unreachable") | |
883 | end | |
884 | local len1 = (c - a):Dot((b - a).unit) | |
885 | local len2 = (b - a).magnitude - len1 | |
886 | local width = (a + (b - a).unit * len1 - c).magnitude | |
887 | local maincf = CFrameFromTopBack(a, (b - a):Cross(c - b).unit, - (b - a).unit) | |
888 | if len1 > 1 / 100 then | |
889 | local sz = VT(0.2, width, len1) | |
890 | local w1 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz) | |
891 | local sp = CreateMesh("SpecialMesh", w1, "Wedge", "", "", VT(0, 1, 1) * sz / w1.Size, VT(0, 0, 0)) | |
892 | w1.Anchored = true | |
893 | w1.CFrame = maincf * ANGLES(math.pi, 0, math.pi / 2) * CF(0, width / 2, len1 / 2) | |
894 | coroutine.resume(coroutine.create(function() | |
895 | for i = 0.5, 1, delay * (2 / Animation_Speed) do | |
896 | Swait() | |
897 | w1.Transparency = i | |
898 | end | |
899 | w1.Parent = nil | |
900 | end)) | |
901 | game:GetService("Debris"):AddItem(w1, 10) | |
902 | --table.insert(list, w1) | |
903 | end | |
904 | if len2 > 1 / 100 then | |
905 | local sz = VT(0.2, width, len2) | |
906 | local w2 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz) | |
907 | local sp = CreateMesh("SpecialMesh", w2, "Wedge", "", "", VT(0, 1, 1) * sz / w2.Size, VT(0, 0, 0)) | |
908 | w2.Anchored = true | |
909 | w2.CFrame = maincf * ANGLES(math.pi, math.pi, -math.pi / 2) * CF(0, width / 2, -len1 - len2 / 2) | |
910 | coroutine.resume(coroutine.create(function() | |
911 | for i = 0.5, 1, delay * (2 / Animation_Speed) do | |
912 | Swait() | |
913 | w2.Transparency = i | |
914 | end | |
915 | w2.Parent = nil | |
916 | end)) | |
917 | game:GetService("Debris"):AddItem(w2, 10) | |
918 | --table.insert(list, w2) | |
919 | end | |
920 | --return unpack(list) | |
921 | end | |
922 | ||
923 | --[[Usage: | |
924 | local Pos = Part | |
925 | local Offset = Part.CFrame * CF(0, 0, 0) | |
926 | local Color = "Institutional white" | |
927 | local Material = "Neon" | |
928 | local TheDelay = 0.01 | |
929 | local Height = 4 | |
930 | BLCF = Offset | |
931 | if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then | |
932 | local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay) | |
933 | if a then game:GetService("Debris"):AddItem(a, 1) end | |
934 | if b then game:GetService("Debris"):AddItem(b, 1) end | |
935 | local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay) | |
936 | if a then game:GetService("Debris"):AddItem(a, 1) end | |
937 | if b then game:GetService("Debris"):AddItem(b, 1) end | |
938 | SCFR = BLCF | |
939 | elseif not SCFR then | |
940 | SCFR = BLCF | |
941 | end | |
942 | -- | |
943 | BLCF = nil | |
944 | SCFR = nil | |
945 | --]] | |
946 | ||
947 | --//=================================\\ | |
948 | --\\=================================// | |
949 | ||
950 | ||
951 | ||
952 | ||
953 | ||
954 | --//=================================\\ | |
955 | --|| RESIZE PLAYER | |
956 | --\\=================================// | |
957 | ||
958 | if Player_Size ~= 1 then | |
959 | RootPart.Size = RootPart.Size * Player_Size | |
960 | Torso.Size = Torso.Size * Player_Size | |
961 | Head.Size = Head.Size * Player_Size | |
962 | RightArm.Size = RightArm.Size * Player_Size | |
963 | LeftArm.Size = LeftArm.Size * Player_Size | |
964 | RightLeg.Size = RightLeg.Size * Player_Size | |
965 | LeftLeg.Size = LeftLeg.Size * Player_Size | |
966 | RootJoint.Parent = RootPart | |
967 | Neck.Parent = Torso | |
968 | RightShoulder.Parent = Torso | |
969 | LeftShoulder.Parent = Torso | |
970 | RightHip.Parent = Torso | |
971 | LeftHip.Parent = Torso | |
972 | ||
973 | RootJoint.C0 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
974 | RootJoint.C1 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
975 | Neck.C0 = NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
976 | Neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
977 | RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0 | |
978 | LeftShoulder.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0 | |
979 | if Disable_Moving_Arms == false then | |
980 | RightShoulder.C1 = ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5) | |
981 | LeftShoulder.C1 = ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5) | |
982 | else | |
983 | RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
984 | LeftShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
985 | end | |
986 | 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)) | |
987 | 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)) | |
988 | RightHip.C1 = CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
989 | LeftHip.C1 = CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
990 | end | |
991 | ||
992 | ||
993 | --//=================================\\ | |
994 | --\\=================================// | |
995 | ||
996 | ||
997 | ||
998 | ||
999 | ||
1000 | --//=================================\\ | |
1001 | --|| WEAPON CREATION | |
1002 | --\\=================================// | |
1003 | ||
1004 | local HandlePart = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0, 0, 0)) | |
1005 | - | local HandleMesh = CreateMesh("SpecialMesh", HandlePart, "FileMesh", "652692139", "102396365", VT(.02, .02, .02), VT(0, 3.1 * Player_Size, 0)) |
1005 | + | local HandleMesh = CreateMesh("SpecialMesh", HandlePart, "FileMesh", "652692139", "102396365", VT(.028, .028, .028), VT(0, 3.1 * Player_Size, 0)) |
1006 | local HandleWeld = CreateWeldOrSnapOrMotor("Weld", HandlePart, Torso, HandlePart, CF(2 * Player_Size, 2 * Player_Size, 0.6 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(135)), CF(0, 0, 0)) | |
1007 | ||
1008 | local HitboxPart = CreatePart(3, Weapon, "SmoothPlastic", 0, 1, "Really black", "Hitbox", VT(0, 0, 0)) | |
1009 | local HitboxWeld = CreateWeldOrSnapOrMotor("Weld", HitboxPart, HandlePart, HitboxPart, CF(0 * Player_Size, 4 * Player_Size, 0 * Player_Size), CF(0, 0, 0)) | |
1010 | ||
1011 | local EffectPart = CreatePart(3, Weapon, "SmoothPlastic", 0, 1, "Really black", "Effect Part", VT(0, 0, 0)) | |
1012 | local EffectWeld = CreateWeldOrSnapOrMotor("Weld", EffectPart, HandlePart, EffectPart, CF(0 * Player_Size, 7 * Player_Size, 0 * Player_Size), CF(0, 0, 0)) | |
1013 | ||
1014 | if Player_Size ~= 1 then | |
1015 | for _, v in pairs (Weapon:GetChildren()) do | |
1016 | if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then | |
1017 | local p1 = v.Part1 | |
1018 | v.Part1 = nil | |
1019 | local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components() | |
1020 | v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12) | |
1021 | v.Part1 = p1 | |
1022 | elseif v.ClassName == "Part" then | |
1023 | for _, b in pairs (v:GetChildren()) do | |
1024 | if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then | |
1025 | b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size) | |
1026 | end | |
1027 | end | |
1028 | end | |
1029 | end | |
1030 | end | |
1031 | ||
1032 | for _, c in pairs(Weapon:GetChildren()) do | |
1033 | if c.ClassName == "Part" then | |
1034 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
1035 | end | |
1036 | end | |
1037 | ||
1038 | if Start_Equipped == true and Start_Equipped_With_Equipped_Animation == false then | |
1039 | HandleWeld.Part0 = RightArm | |
1040 | HandleWeld.C0 = CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
1041 | end | |
1042 | ||
1043 | Weapon.Parent = Character | |
1044 | ||
1045 | Humanoid.Died:connect(function() | |
1046 | ATTACK = true | |
1047 | end) | |
1048 | ||
1049 | print(Class_Name.." loaded.") | |
1050 | ||
1051 | --//=================================\\ | |
1052 | --\\=================================// | |
1053 | ||
1054 | ||
1055 | ||
1056 | ||
1057 | ||
1058 | --//=================================\\ | |
1059 | --|| DAMAGE FUNCTIONS | |
1060 | --\\=================================// | |
1061 | ||
1062 | function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) | |
1063 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
1064 | STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0)) | |
1065 | local BODYGYRO = IT("BodyGyro", STATPART) | |
1066 | local BODYPOSITION = IT("BodyPosition", STATPART) | |
1067 | BODYPOSITION.P = 2000 | |
1068 | BODYPOSITION.D = 100 | |
1069 | BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge) | |
1070 | if LABELTYPE == "Normal" then | |
1071 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2)) | |
1072 | elseif LABELTYPE == "Debuff" then | |
1073 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2)) | |
1074 | elseif LABELTYPE == "Interruption" then | |
1075 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2)) | |
1076 | end | |
1077 | game:GetService("Debris"):AddItem(STATPART ,5) | |
1078 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART) | |
1079 | BILLBOARDGUI.Adornee = STATPART | |
1080 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
1081 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
1082 | BILLBOARDGUI.AlwaysOnTop = false | |
1083 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI) | |
1084 | TEXTLABEL.BackgroundTransparency = 1 | |
1085 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
1086 | TEXTLABEL.Text = TEXT | |
1087 | TEXTLABEL.Font = "SourceSans" | |
1088 | TEXTLABEL.FontSize="Size42" | |
1089 | TEXTLABEL.TextColor3 = COLOR | |
1090 | TEXTLABEL.TextStrokeTransparency = 0 | |
1091 | TEXTLABEL.TextScaled = true | |
1092 | TEXTLABEL.TextWrapped = true | |
1093 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
1094 | wait(0.2) | |
1095 | for i=1, 5 do | |
1096 | wait() | |
1097 | THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0) | |
1098 | end | |
1099 | wait(1.2) | |
1100 | for i=1, 5 do | |
1101 | wait() | |
1102 | THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2 | |
1103 | THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2 | |
1104 | THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0) | |
1105 | end | |
1106 | THEPART.Parent = nil | |
1107 | end),STATPART, BODYPOSITION, TEXTLABEL) | |
1108 | end | |
1109 | ||
1110 | function IncreaseOrDecreaseStat(LOCATION, STAT, AMOUNT, DURATION, SHOWTHESTAT) | |
1111 | if LOCATION:FindFirstChild("Stats") ~= nil then | |
1112 | if LOCATION.Stats:FindFirstChild("Block") ~= nil then | |
1113 | if LOCATION.Stats:FindFirstChild("Block").Value == true then | |
1114 | return | |
1115 | end | |
1116 | end | |
1117 | if LOCATION.Stats:FindFirstChild("ChangeStat") ~= nil and LOCATION.Stats:FindFirstChild("Block").Value == false then | |
1118 | local NewStatChange = IT("NumberValue") | |
1119 | NewStatChange.Value = AMOUNT | |
1120 | if STAT == "Defense" then | |
1121 | NewStatChange.Name = "ChangeDefense" | |
1122 | elseif STAT == "Damage" then | |
1123 | NewStatChange.Name = "ChangeDamage" | |
1124 | elseif STAT == "Movement" then | |
1125 | NewStatChange.Name = "ChangeMovement" | |
1126 | end | |
1127 | if SHOWTHESTAT == true then | |
1128 | if AMOUNT < 0 then | |
1129 | StatLabel("Debuff", LOCATION.Head.CFrame * CF(0, 0 + (LOCATION.Head.Size.z - 1), 0), "-"..STAT, C3(1, 1, 1)) | |
1130 | elseif AMOUNT > 0 then | |
1131 | StatLabel("Debuff", LOCATION.Head.CFrame * CF(0, 0 + (LOCATION.Head.Size.z - 1), 0), "+"..STAT, C3(1, 1, 1)) | |
1132 | end | |
1133 | end | |
1134 | if DURATION ~= nil and DURATION ~= 0 then | |
1135 | local StatDuration = IT("NumberValue") | |
1136 | StatDuration.Name = "Duration" | |
1137 | StatDuration.Value = DURATION | |
1138 | StatDuration.Parent = NewStatChange | |
1139 | end | |
1140 | NewStatChange.Parent = LOCATION.Stats:FindFirstChild("ChangeStat") | |
1141 | end | |
1142 | end | |
1143 | end | |
1144 | ||
1145 | --Usage: DamageFunction(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, hit, false, 5, 10, MRANDOM(5, 10), "Normal", Part, 0.5, false, true, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false) | |
1146 | function DamageFunction(HITWEAPONSOUND, HITARMORSOUND, HITBLOCKSOUND, HITPLAYERSOUND, HITWEAPONSOUNDPITCH, HITARMORSOUNDPITCH, HITBLOCKSOUNDPITCH, HITPLAYERSOUNDPITCH, HIT, HITEVENWHENDEAD, MINIMUMDAMAGE, MAXIMUMDAMAGE, KNOCKBACK, TYPE, PROPERTY, DELAY, KNOCKBACKTYPE, INCREASESTUN, STAGGER, STAGGERHIT, RANGED, DECREASETHESTAT, DECREASEAMOUNT, DECREASEDURATION, SHOWDECREASEDSTAT) | |
1147 | if HIT.Parent == nil then | |
1148 | return | |
1149 | end | |
1150 | local HITHUMANOID = HIT.Parent:FindFirstChild("Humanoid") | |
1151 | for _, v in pairs(HIT.Parent:GetChildren()) do | |
1152 | if v:IsA("Humanoid") then | |
1153 | HITHUMANOID = v | |
1154 | end | |
1155 | end | |
1156 | if HIT.Name == "Hitbox" and RANGED ~= true and HIT.Parent ~= Weapon and Enable_Stagger_Hit == true then | |
1157 | StaggerHit.Value = true | |
1158 | if Play_Hitbox_Hit_Sound == true then | |
1159 | if HITWEAPONSOUND ~= "" and HITWEAPONSOUND ~= "nil" then | |
1160 | CreateSound(HITWEAPONSOUND, HIT, 1, HITWEAPONSOUNDPITCH) | |
1161 | end | |
1162 | end | |
1163 | return | |
1164 | end | |
1165 | if HIT.Parent.Parent:FindFirstChild("Torso") ~= nil or HIT.Parent.Parent:FindFirstChild("UpperTorso") ~= nil then | |
1166 | HITHUMANOID = HIT.Parent.Parent:FindFirstChild("Humanoid") | |
1167 | end | |
1168 | if HIT.Parent.ClassName == "Hat" or HIT.ClassName == "Accessory" then | |
1169 | HIT = HIT.Parent.Parent:FindFirstChild("Head") | |
1170 | end | |
1171 | if HITHUMANOID ~= nil and HIT.Parent.Name ~= Character.Name and (HIT.Parent:FindFirstChild("Torso") ~= nil or HIT.Parent:FindFirstChild("UpperTorso") ~= nil) then | |
1172 | if HIT.Parent:FindFirstChild("DebounceHit") ~= nil then | |
1173 | if HIT.Parent.DebounceHit.Value == true then | |
1174 | return | |
1175 | end | |
1176 | end | |
1177 | if AntiTeamKill.Value == true then | |
1178 | if Player.Neutral == false and game.Players:GetPlayerFromCharacter(HIT.Parent) ~= nil then | |
1179 | if game.Players:GetPlayerFromCharacter(HIT.Parent).TeamColor == Player.TeamColor then | |
1180 | return | |
1181 | end | |
1182 | end | |
1183 | end | |
1184 | if HITEVENWHENDEAD == false then | |
1185 | if HIT.Parent:FindFirstChild("Humanoid") ~= nil then | |
1186 | if HIT.Parent:FindFirstChild("Humanoid").Health <= 0 then | |
1187 | return | |
1188 | end | |
1189 | end | |
1190 | end | |
1191 | if HIT.Parent:FindFirstChild("Stats") ~= nil then | |
1192 | if HIT.Parent.Stats:FindFirstChild("StunValue") ~= nil then | |
1193 | HIT.Parent.Stats:FindFirstChild("StunValue").Value = HIT.Parent.Stats:FindFirstChild("StunValue").Value + INCREASESTUN | |
1194 | end | |
1195 | end | |
1196 | if HIT.Parent:FindFirstChild("Stats") ~= nil then | |
1197 | if HIT.Parent.Stats:FindFirstChild("Stagger") ~= nil then | |
1198 | if STAGGER == true and Enable_Stagger == true then | |
1199 | HIT.Parent.Stats:FindFirstChild("Stagger").Value = true | |
1200 | end | |
1201 | end | |
1202 | end | |
1203 | if HIT.Parent:FindFirstChild("Stats") ~= nil then | |
1204 | if HIT.Parent.Stats:FindFirstChild("Block") ~= nil then | |
1205 | if HIT.Parent.Stats:FindFirstChild("Block").Value == true then | |
1206 | HASBEENBLOCKED = true | |
1207 | if HIT.Parent.Stats:FindFirstChild("Block"):FindFirstChild("BlockDebounce") == nil then | |
1208 | StatLabel("Interruption", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Blocked!", C3(0, 100 / 255, 255 / 255)) | |
1209 | if RANGED ~= true then | |
1210 | if HITBLOCKSOUND ~= "" and HITBLOCKSOUND ~= "nil" then | |
1211 | CreateSound(HITBLOCKSOUND, HIT, 1, HITBLOCKSOUNDPITCH) | |
1212 | end | |
1213 | end | |
1214 | local BlockDebounce = IT("BoolValue", HIT.Parent.Stats:FindFirstChild("Block")) | |
1215 | BlockDebounce.Name = "BlockDebounce" | |
1216 | BlockDebounce.Value = true | |
1217 | if RANGED ~= true then | |
1218 | game:GetService("Debris"):AddItem(BlockDebounce, 0.5) | |
1219 | else | |
1220 | game:GetService("Debris"):AddItem(BlockDebounce, 0.1) | |
1221 | end | |
1222 | end | |
1223 | if RANGED ~= true and Enable_Stagger == true then | |
1224 | HIT.Parent.Stats:FindFirstChild("Block").Value = false | |
1225 | Stagger.Value = true | |
1226 | end | |
1227 | return | |
1228 | end | |
1229 | end | |
1230 | end | |
1231 | if DECREASETHESTAT ~= nil then | |
1232 | if HIT.Parent:FindFirstChild("Stats") ~= nil then | |
1233 | IncreaseOrDecreaseStat(HIT.Parent, DECREASETHESTAT, DECREASEAMOUNT, DECREASEDURATION, SHOWDECREASEDSTAT) | |
1234 | end | |
1235 | end | |
1236 | local DAMAGE = MRANDOM(MINIMUMDAMAGE,MAXIMUMDAMAGE) * Damage.Value | |
1237 | if HIT.Parent:FindFirstChild("Stats") ~= nil then | |
1238 | if HIT.Parent.Stats:FindFirstChild("Defense") ~= nil then | |
1239 | if CanPenetrateArmor.Value == true then | |
1240 | DAMAGE = DAMAGE | |
1241 | else | |
1242 | DAMAGE = DAMAGE / HIT.Parent.Stats:FindFirstChild("Defense").Value | |
1243 | end | |
1244 | elseif HIT.Parent.Stats:FindFirstChild("Defense") == nil then | |
1245 | DAMAGE = DAMAGE | |
1246 | end | |
1247 | end | |
1248 | if CanCrit.Value == true then | |
1249 | CRITCHANCENUMBER = MRANDOM(1, CritChance.Value) | |
1250 | if CRITCHANCENUMBER == 1 then | |
1251 | DAMAGE = DAMAGE * 2 | |
1252 | end | |
1253 | end | |
1254 | DAMAGE = math.floor(DAMAGE) | |
1255 | if HASBEENBLOCKED == false then | |
1256 | HITHUMANOID.Health = HITHUMANOID.Health - DAMAGE | |
1257 | end | |
1258 | if DAMAGE <= 3 and HASBEENBLOCKED == false then | |
1259 | if STAGGERHIT == true and Enable_Stagger_Hit == true and RANGED ~= true then | |
1260 | StaggerHit.Value = true | |
1261 | end | |
1262 | if HITARMORSOUND ~= "" and HITARMORSOUND ~= "nil" then | |
1263 | CreateSound(HITARMORSOUND, HIT, 1, HITARMORSOUNDPITCH) | |
1264 | end | |
1265 | elseif DAMAGE > 3 and HASBEENBLOCKED == false then | |
1266 | if HITPLAYERSOUND ~= "" and HITPLAYERSOUND ~= "nil" then | |
1267 | CreateSound(HITPLAYERSOUND, HIT, 1, HITPLAYERSOUNDPITCH) | |
1268 | end | |
1269 | end | |
1270 | if DAMAGE > 3 and DAMAGE < 20 and HASBEENBLOCKED == false then | |
1271 | if CanCrit.Value == true and CRITCHANCENUMBER == 1 then | |
1272 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Crit! \n"..DAMAGE, C3(200/255, 0, 0)) | |
1273 | CreateSound("296102734", HIT, 1, 1) | |
1274 | else | |
1275 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), DAMAGE, C3(255/255, 220/255, 0)) | |
1276 | end | |
1277 | elseif DAMAGE >= 20 and HASBEENBLOCKED == false then | |
1278 | if CanCrit.Value == true and CRITCHANCENUMBER == 1 then | |
1279 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Crit! \n"..DAMAGE, C3(200/255, 0, 0)) | |
1280 | CreateSound("296102734", HIT, 1, 1) | |
1281 | else | |
1282 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), DAMAGE, C3(255/255, 0, 0)) | |
1283 | end | |
1284 | elseif DAMAGE <= 3 and HASBEENBLOCKED == false then | |
1285 | if CanCrit.Value == true and CRITCHANCENUMBER == 1 then | |
1286 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), "Crit! \n"..DAMAGE, C3(200/255, 0, 0)) | |
1287 | CreateSound("296102734", HIT, 1, 1) | |
1288 | else | |
1289 | StatLabel("Normal", HIT.Parent.Head.CFrame * CF(0, 0 + (HIT.Parent.Head.Size.z - 1), 0), DAMAGE, C3(225/255, 225/255, 225/255)) | |
1290 | end | |
1291 | end | |
1292 | if TYPE == "Normal" then | |
1293 | local vp = IT("BodyVelocity") | |
1294 | vp.P=500 | |
1295 | vp.maxForce = VT(math.huge, 0, math.huge) | |
1296 | if KNOCKBACKTYPE == 1 then | |
1297 | vp.Velocity = PROPERTY.CFrame.lookVector * KNOCKBACK + PROPERTY.Velocity / 1.05 | |
1298 | elseif KNOCKBACKTYPE == 2 then | |
1299 | vp.Velocity = PROPERTY.CFrame.lookVector * KNOCKBACK | |
1300 | end | |
1301 | if KNOCKBACK > 0 and HASBEENBLOCKED == false then | |
1302 | vp.Parent = HIT--.Parent.Torso | |
1303 | end | |
1304 | game:GetService("Debris"):AddItem(vp, 0.5) | |
1305 | end | |
1306 | HASBEENBLOCKED = false | |
1307 | RecentEnemy.Value = HIT.Parent | |
1308 | local DebounceHit = IT("BoolValue", HIT.Parent) | |
1309 | DebounceHit.Name = "DebounceHit" | |
1310 | DebounceHit.Value = true | |
1311 | game:GetService("Debris"):AddItem(DebounceHit, DELAY) | |
1312 | end | |
1313 | end | |
1314 | ||
1315 | --Usage: MagnitudeDamage(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, Part, 5, true, 5, 10, MRANDOM(5, 10), "Normal", Part, 0.5, false, true, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false) | |
1316 | function MagnitudeDamage(HITWEAPONSOUND, HITARMORSOUND, HITBLOCKSOUND, HITPLAYERSOUND, HITWEAPONSOUNDPITCH, HITARMORSOUNDPITCH, HITBLOCKSOUNDPITCH, HITPLAYERSOUNDPITCH, PART, MAGNITUDE, HITEVENWHENDEAD, MINIMUMDAMAGE, MAXIMUMDAMAGE, KNOCKBACK, TYPE, PROPERTY, DELAY, KNOCKBACKTYPE, INCREASESTUN, STAGGER, STAGGERHIT, RANGED, MAGNITUDEDECREASETHESTAT, MAGNITUDEDECREASEAMOUNT, MAGNITUDEDECREASEDURATION, MAGNITUDESHOWDECREASEDSTAT) | |
1317 | for _, c in pairs(workspace:GetChildren()) do | |
1318 | local HUMANOID = c:FindFirstChild("Humanoid") | |
1319 | local HEAD = nil | |
1320 | if HUMANOID ~= nil then | |
1321 | for _, d in pairs(c:GetChildren()) do | |
1322 | if d.ClassName == "Model" and RANGED ~= true then | |
1323 | HEAD = d:FindFirstChild("Hitbox") | |
1324 | if HEAD ~= nil then | |
1325 | local THEMAGNITUDE = (HEAD.Position - PART.Position).magnitude | |
1326 | if THEMAGNITUDE <= (MAGNITUDE * Player_Size) and c.Name ~= Player.Name then | |
1327 | if Play_Hitbox_Hit_Sound == true then | |
1328 | local HitRefpart = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
1329 | HitRefpart.Anchored = true | |
1330 | HitRefpart.CFrame = CF(HEAD.Position) | |
1331 | CreateSound(HITWEAPONSOUND, HitRefpart, 1, HITWEAPONSOUNDPITCH) | |
1332 | end | |
1333 | if Enable_Stagger_Hit == true then | |
1334 | StaggerHit.Value = true | |
1335 | end | |
1336 | end | |
1337 | end | |
1338 | elseif d:IsA"BasePart" then | |
1339 | HEAD = d | |
1340 | if HEAD ~= nil then | |
1341 | local THEMAGNITUDE = (HEAD.Position - PART.Position).magnitude | |
1342 | if THEMAGNITUDE <= (MAGNITUDE * Player_Size) and c.Name ~= Player.Name then | |
1343 | DamageFunction(HITWEAPONSOUND, HITARMORSOUND, HITBLOCKSOUND, HITPLAYERSOUND, HITWEAPONSOUNDPITCH, HITARMORSOUNDPITCH, HITBLOCKSOUNDPITCH, HITPLAYERSOUNDPITCH, HEAD, HITEVENWHENDEAD, MINIMUMDAMAGE, MAXIMUMDAMAGE, KNOCKBACK, TYPE, PROPERTY, DELAY, KNOCKBACKTYPE, INCREASESTUN, STAGGER, STAGGERHIT, RANGED, MAGNITUDEDECREASETHESTAT, MAGNITUDEDECREASEAMOUNT, MAGNITUDEDECREASEDURATION, MAGNITUDESHOWDECREASEDSTAT) | |
1344 | end | |
1345 | end | |
1346 | end | |
1347 | end | |
1348 | end | |
1349 | end | |
1350 | end | |
1351 | ||
1352 | --Usage: MagnitudeBuffOrDebuff(Part, 5, "Defense", -0.1, 3, true, true) | |
1353 | function MagnitudeBuffOrDebuff(PART, MAGNITUDE, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF, APPLYTOOTHERSINSTEAD) | |
1354 | if Player.Neutral == true then | |
1355 | IncreaseOrDecreaseStat(Character, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF) | |
1356 | end | |
1357 | for _, c in pairs(workspace:GetChildren()) do | |
1358 | local HUMANOID = c:FindFirstChild("Humanoid") | |
1359 | local THEHEAD = nil | |
1360 | if HUMANOID ~= nil then | |
1361 | if c:FindFirstChild("Torso") ~= nil then | |
1362 | THEHEAD = c:FindFirstChild("Torso") | |
1363 | elseif c:FindFirstChild("UpperTorso") ~= nil then | |
1364 | THEHEAD = c:FindFirstChild("UpperTorso") | |
1365 | end | |
1366 | if THEHEAD ~= nil then | |
1367 | local THEMAGNITUDE = (THEHEAD.Position - PART.Position).magnitude | |
1368 | print("yes 1") | |
1369 | if APPLYTOOTHERSINSTEAD == true then | |
1370 | if THEMAGNITUDE <= (MAGNITUDE * Player_Size) and c.Name ~= Player.Name then | |
1371 | if Player.Neutral == false and game.Players:GetPlayerFromCharacter(THEHEAD.Parent) ~= nil then | |
1372 | if game.Players:GetPlayerFromCharacter(THEHEAD.Parent).TeamColor == Player.TeamColor then | |
1373 | IncreaseOrDecreaseStat(THEHEAD.Parent, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF) | |
1374 | end | |
1375 | end | |
1376 | end | |
1377 | elseif APPLYTOOTHERSINSTEAD == false then | |
1378 | if THEMAGNITUDE <= (MAGNITUDE * Player_Size) then | |
1379 | if Player.Neutral == false and game.Players:GetPlayerFromCharacter(THEHEAD.Parent) ~= nil then | |
1380 | if game.Players:GetPlayerFromCharacter(THEHEAD.Parent).TeamColor == Player.TeamColor then | |
1381 | IncreaseOrDecreaseStat(THEHEAD.Parent, STAT, AMOUNT, DURATION, SHOWBUFFORDEBUFF) | |
1382 | end | |
1383 | end | |
1384 | end | |
1385 | end | |
1386 | end | |
1387 | end | |
1388 | end | |
1389 | end | |
1390 | ||
1391 | --//=================================\\ | |
1392 | --\\=================================// | |
1393 | ||
1394 | ||
1395 | ||
1396 | ||
1397 | ||
1398 | --//=================================\\ | |
1399 | --|| WEAPON GUI | |
1400 | --\\=================================// | |
1401 | ||
1402 | local MANABAR = CreateFrame(WEAPONGUI, Mana_Bar_Background_Transparency, 2, UD2(0.23, 0, 0.82, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_8.r, Custom_Colors.Custom_Color_8.g, Custom_Colors.Custom_Color_8.b), C3(0, 0, 0),"Mana Bar") | |
1403 | local MANACOVER = CreateFrame(MANABAR, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_5.r, Custom_Colors.Custom_Color_5.g, Custom_Colors.Custom_Color_5.b), C3(0, 0, 0),"Mana Cover") | |
1404 | local MANATEXT = CreateLabel(MANABAR, Mana_Name.." ["..FLOOR(Mana.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Mana Text") | |
1405 | ||
1406 | local HEALTHBAR = CreateFrame(WEAPONGUI, Health_Bar_Background_Transparency, 2, UD2(0.5, 0, 0.82, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_11.r, Custom_Colors.Custom_Color_11.g, Custom_Colors.Custom_Color_11.b), C3(0, 0, 0), "Health Bar") | |
1407 | local HEALTHCOVER = CreateFrame(HEALTHBAR, 0, 2,UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_6.r, Custom_Colors.Custom_Color_6.g, Custom_Colors.Custom_Color_6.b), C3(0, 0, 0), "Health Cover") | |
1408 | local HEALTHTEXT = CreateLabel(HEALTHBAR, "Health ["..FLOOR(Humanoid.Health).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Health Text") | |
1409 | ||
1410 | local STUNFRAME = CreateFrame(nil, Stun_Bar_Background_Transparency, 2, UD2(0.5, 0, 0.78, 0),UD2(0.26, 0, 0, 0),C3(Custom_Colors.Custom_Color_10.r, Custom_Colors.Custom_Color_10.g, Custom_Colors.Custom_Color_10.b), C3(0, 0, 0), "Stun Frame") | |
1411 | local STUNBAR = CreateFrame(STUNFRAME, 0, 2, UD2(0, 0, 0, 0),UD2(0, 0, 1, 0),C3(Custom_Colors.Custom_Color_7.r, Custom_Colors.Custom_Color_7.g, Custom_Colors.Custom_Color_7.b), C3(0, 0, 0), "Stun Bar") | |
1412 | local STUNTEXT = CreateLabel(STUNFRAME, "Stun ["..FLOOR(StunValue.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Stun Text") | |
1413 | ||
1414 | local SECONDARYMANABAR = CreateFrame(nil, Secondary_Mana_Bar_Background_Transparency, 2, UD2(0.23, 0, 0.78, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_9.r, Custom_Colors.Custom_Color_9.g, Custom_Colors.Custom_Color_9.b), C3(0, 0, 0),"Secondary Mana Bar") | |
1415 | local SECONDARYMANACOVER = CreateFrame(SECONDARYMANABAR, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_4.r, Custom_Colors.Custom_Color_4.g, Custom_Colors.Custom_Color_4.b), C3(0, 0, 0),"Secondary Mana Cover") | |
1416 | local SECONDARYMANATEXT = CreateLabel(SECONDARYMANABAR, Secondary_Mana_Name.." ["..FLOOR(SecondaryMana.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Secondary Mana Text") | |
1417 | ||
1418 | local DEFENSEFRAME = CreateFrame(nil, Stat_Background_Transparency, 2, UD2(0.23, 0, Stat_Offset, 0), UD2(0.075, 0, 0, 0), C3(100 / 255, 100 / 255, 255 / 255), C3(0, 0, 0),"Defense Frame") | |
1419 | local DEFENSETEXT = CreateLabel(DEFENSEFRAME, "Defense ["..(Defense.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Defense Text") | |
1420 | ||
1421 | local DAMAGEFRAME = CreateFrame(nil, Stat_Background_Transparency, 2, UD2(0.456, 0, Stat_Offset, 0), UD2(0.075, 0, 0, 0), C3(255 / 255, 100 / 255, 100 / 255), C3(0, 0, 0),"Damage Frame") | |
1422 | local DAMAGETEXT = CreateLabel(DAMAGEFRAME, "Damage ["..(Damage.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Damage Text") | |
1423 | ||
1424 | local MOVEMENTFRAME = CreateFrame(nil, Stat_Background_Transparency, 2, UD2(0.685, 0, Stat_Offset, 0), UD2(0.075, 0, 0, 0), C3(100 / 255, 255 / 255, 100 / 255), C3(0, 0, 0),"Movement Frame") | |
1425 | local MOVEMENTTEXT = CreateLabel(MOVEMENTFRAME, "Movement ["..(Movement.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Movement Text") | |
1426 | ||
1427 | local SKILL1FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.23, 0, 0.86, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 1 Frame") | |
1428 | local SKILL2FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.50, 0, 0.86, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 2 Frame") | |
1429 | local SKILL3FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.23, 0, 0.93, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 3 Frame") | |
1430 | local SKILL4FRAME = CreateFrame(nil, Ability_Background_Transparency, 2, UD2(0.50, 0, 0.93, 0), UD2(0.26, 0, 0, 0), C3(Custom_Colors.Custom_Color_12.r, Custom_Colors.Custom_Color_12.g, Custom_Colors.Custom_Color_12.b), C3(0, 0, 0), "Skill 4 Frame") | |
1431 | ||
1432 | local SKILL1BAR = CreateFrame(SKILL1FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 1 Bar") | |
1433 | local SKILL2BAR = CreateFrame(SKILL2FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 2 Bar") | |
1434 | local SKILL3BAR = CreateFrame(SKILL3FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 3 Bar") | |
1435 | local SKILL4BAR = CreateFrame(SKILL4FRAME, 0, 2, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), C3(Custom_Colors.Custom_Color_3.r, Custom_Colors.Custom_Color_3.g, Custom_Colors.Custom_Color_3.b), C3(0, 0, 0), "Skill 4 Bar") | |
1436 | ||
1437 | local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Ability 1", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 1") | |
1438 | local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[X] Ability 2", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 2") | |
1439 | local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 3") | |
1440 | local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 4") | |
1441 | ||
1442 | if Enable_Gui == true then | |
1443 | WEAPONGUI.Parent = PlayerGui | |
1444 | end | |
1445 | ||
1446 | if Enable_Stats == true and Show_Stats == true then | |
1447 | DEFENSEFRAME.Parent = WEAPONGUI | |
1448 | DAMAGEFRAME.Parent = WEAPONGUI | |
1449 | MOVEMENTFRAME.Parent = WEAPONGUI | |
1450 | end | |
1451 | ||
1452 | if Enable_Secondary_Bar == true then | |
1453 | SECONDARYMANABAR.Parent = WEAPONGUI | |
1454 | end | |
1455 | ||
1456 | if Enable_Abilities == true then | |
1457 | SKILL1FRAME.Parent = WEAPONGUI | |
1458 | SKILL2FRAME.Parent = WEAPONGUI | |
1459 | SKILL3FRAME.Parent = WEAPONGUI | |
1460 | SKILL4FRAME.Parent = WEAPONGUI | |
1461 | end | |
1462 | ||
1463 | if Enable_Stun == true then | |
1464 | STUNFRAME.Parent = WEAPONGUI | |
1465 | end | |
1466 | ||
1467 | function UpdateGUI() | |
1468 | MANABAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1469 | MANACOVER:TweenSize(UD2(1 * (Mana.Value / Max_Mana), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1470 | MANATEXT.Text = Mana_Name.." ["..FLOOR(Mana.Value).."]" | |
1471 | HEALTHBAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1472 | HEALTHCOVER:TweenSize(UD2(1 * (Humanoid.Health / Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1473 | HEALTHTEXT.Text = "Health ["..FLOOR(Humanoid.Health).."]" | |
1474 | if Enable_Abilities == true then | |
1475 | SKILL1FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1476 | SKILL2FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1477 | SKILL3FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1478 | SKILL4FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1479 | SKILL1BAR:TweenSize(UD2(1 * (CO1 / Cooldown_1), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1480 | SKILL2BAR:TweenSize(UD2(1 * (CO2 / Cooldown_2), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1481 | SKILL3BAR:TweenSize(UD2(1 * (CO3 / Cooldown_3), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1482 | SKILL4BAR:TweenSize(UD2(1 * (CO4 / Cooldown_4), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1483 | end | |
1484 | if Enable_Stats == true and Show_Stats == true then | |
1485 | DEFENSEFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1486 | DEFENSETEXT.Text = "Defense ["..(Defense.Value * 100).."%]" | |
1487 | DAMAGEFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1488 | DAMAGETEXT.Text = "Damage ["..(Damage.Value * 100).."%]" | |
1489 | MOVEMENTFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1490 | MOVEMENTTEXT.Text = "Movement ["..(Movement.Value * 100).."%]" | |
1491 | end | |
1492 | if Enable_Stun == true then | |
1493 | STUNFRAME:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1494 | STUNBAR:TweenSize(UD2(1 * (StunValue.Value / Max_Stun), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1495 | STUNTEXT.Text = "Stun ["..FLOOR(StunValue.Value).."]" | |
1496 | end | |
1497 | if Enable_Secondary_Bar == true then | |
1498 | SECONDARYMANABAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1499 | SECONDARYMANACOVER:TweenSize(UD2(1 * (SecondaryMana.Value / Max_Secondary_Mana), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
1500 | SECONDARYMANATEXT.Text = Secondary_Mana_Name.." ["..FLOOR(SecondaryMana.Value).."]" | |
1501 | end | |
1502 | end | |
1503 | ||
1504 | if Enable_Gui == true then | |
1505 | UpdateGUI() | |
1506 | for _, v in pairs (WEAPONGUI:GetChildren()) do | |
1507 | if v.ClassName == "Frame" then | |
1508 | for _, b in pairs (v:GetChildren()) do | |
1509 | if b.ClassName == "TextLabel" then | |
1510 | coroutine.resume(coroutine.create(function(THETEXTLABEL) | |
1511 | wait(Menu_Update_Speed) | |
1512 | for i = 1, 0, -0.1 do | |
1513 | Swait() | |
1514 | THETEXTLABEL.TextTransparency = i | |
1515 | THETEXTLABEL.TextStrokeTransparency = i | |
1516 | end | |
1517 | THETEXTLABEL.TextTransparency = 0 | |
1518 | THETEXTLABEL.TextStrokeTransparency = 0 | |
1519 | end), b) | |
1520 | end | |
1521 | end | |
1522 | end | |
1523 | end | |
1524 | end | |
1525 | ||
1526 | --//=================================\\ | |
1527 | --\\=================================// | |
1528 | ||
1529 | ||
1530 | ||
1531 | ||
1532 | ||
1533 | --//=================================\\ | |
1534 | --|| SKILL FUNCTIONS | |
1535 | --\\=================================// | |
1536 | ||
1537 | function UpdateSkillsAndStuff() | |
1538 | if Mana_Regen_Mode == "1" then | |
1539 | if Mana.Value >= Max_Mana then | |
1540 | Mana.Value = Max_Mana | |
1541 | elseif Mana.Value < 0 then | |
1542 | Mana.Value = 0 | |
1543 | else | |
1544 | if MANADELAYNUMBER <= Mana_Wait then | |
1545 | MANADELAYNUMBER = MANADELAYNUMBER + 1 | |
1546 | else | |
1547 | MANADELAYNUMBER = 0 | |
1548 | Mana.Value = Mana.Value + Recover_Mana | |
1549 | end | |
1550 | end | |
1551 | elseif Mana_Regen_Mode == "2" then | |
1552 | if Mana.Value <= Max_Mana then | |
1553 | Mana.Value = Mana.Value + (Recover_Mana / 30) / Animation_Speed | |
1554 | elseif Mana.Value >= Max_Mana then | |
1555 | Mana.Value = Max_Mana | |
1556 | elseif Mana.Value < 0 then | |
1557 | Mana.Value = 0 | |
1558 | end | |
1559 | end | |
1560 | if Enable_Secondary_Bar == true then | |
1561 | if Secondary_Mana_Regen_Mode == "1" then | |
1562 | if SecondaryMana.Value >= Max_Secondary_Mana then | |
1563 | SecondaryMana.Value = Max_Secondary_Mana | |
1564 | elseif SecondaryMana.Value < 0 then | |
1565 | SecondaryMana.Value = 0 | |
1566 | else | |
1567 | if SECONDARYMANADELAYNUMBER <= Secondary_Mana_Wait then | |
1568 | SECONDARYMANADELAYNUMBER = SECONDARYMANADELAYNUMBER + 1 | |
1569 | else | |
1570 | SECONDARYMANADELAYNUMBER = 0 | |
1571 | SecondaryMana.Value = SecondaryMana.Value + Recover_Secondary_Mana | |
1572 | end | |
1573 | end | |
1574 | elseif Secondary_Mana_Regen_Mode == "2" then | |
1575 | if SecondaryMana.Value <= Max_Secondary_Mana then | |
1576 | SecondaryMana.Value = SecondaryMana.Value + (Recover_Secondary_Mana / 30) / Animation_Speed | |
1577 | elseif SecondaryMana.Value >= Max_Secondary_Mana then | |
1578 | SecondaryMana.Value = Max_Secondary_Mana | |
1579 | elseif SecondaryMana.Value < 0 then | |
1580 | SecondaryMana.Value = 0 | |
1581 | end | |
1582 | end | |
1583 | else | |
1584 | SecondaryMana.Value = 0 | |
1585 | end | |
1586 | if Enable_Stun == true then | |
1587 | if Stun_Lose_Mode == "1" then | |
1588 | if StunValue.Value > Max_Stun then | |
1589 | StunValue.Value = Max_Stun | |
1590 | elseif StunValue.Value <= 0 then | |
1591 | StunValue.Value = 0 | |
1592 | else | |
1593 | if STUNDELAYNUMBER <= Stun_Wait then | |
1594 | STUNDELAYNUMBER = STUNDELAYNUMBER + 1 | |
1595 | else | |
1596 | STUNDELAYNUMBER = 0 | |
1597 | StunValue.Value = StunValue.Value - Lose_Stun | |
1598 | end | |
1599 | end | |
1600 | elseif Stun_Lose_Mode == "2" then | |
1601 | if StunValue.Value <= Max_Stun and StunValue.Value > 0 then | |
1602 | StunValue.Value = StunValue.Value - (Lose_Stun / 30) / Animation_Speed | |
1603 | elseif StunValue.Value > Max_Stun then | |
1604 | StunValue.Value = Max_Stun | |
1605 | elseif StunValue.Value <= 0 then | |
1606 | StunValue.Value = 0 | |
1607 | end | |
1608 | end | |
1609 | else | |
1610 | StunValue.Value = 0 | |
1611 | end | |
1612 | if Enable_Abilities == true then | |
1613 | if CO1 <= Cooldown_1 then | |
1614 | CO1 = CO1 + (1 / 30) / Animation_Speed | |
1615 | elseif CO1 >= Cooldown_1 then | |
1616 | CO1 = Cooldown_1 | |
1617 | end | |
1618 | if CO2 <= Cooldown_2 then | |
1619 | CO2 = CO2 + (1 / 30) / Animation_Speed | |
1620 | elseif CO2 >= Cooldown_2 then | |
1621 | CO2 = Cooldown_2 | |
1622 | end | |
1623 | if CO3 <= Cooldown_3 then | |
1624 | CO3 = CO3 + (1 / 30) / Animation_Speed | |
1625 | elseif CO3 >= Cooldown_3 then | |
1626 | CO3 = Cooldown_3 | |
1627 | end | |
1628 | if CO4 <= Cooldown_4 then | |
1629 | CO4 = CO4 + (1 / 30) / Animation_Speed | |
1630 | elseif CO4 >= Cooldown_4 then | |
1631 | CO4 = Cooldown_4 | |
1632 | end | |
1633 | end | |
1634 | end | |
1635 | ||
1636 | --//=================================\\ | |
1637 | --\\=================================// | |
1638 | ||
1639 | ||
1640 | ||
1641 | ||
1642 | ||
1643 | --//=================================\\ | |
1644 | --|| ATTACK FUNCTIONS AND STUFF | |
1645 | --\\=================================// | |
1646 | ||
1647 | function EquipWeapon() | |
1648 | --ATTACK = true | |
1649 | DEFENSECHANGE1.Parent = nil | |
1650 | MOVEMENTCHANGE1.Parent = ChangeStat | |
1651 | for i=0, 1, 0.5 / Animation_Speed do | |
1652 | Swait() | |
1653 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed) | |
1654 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(-20)), 0.3 / Animation_Speed) | |
1655 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.75 * Player_Size, 0 * Player_Size) * ANGLES(RAD(140), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(45), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1656 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1657 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed) | |
1658 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed) | |
1659 | end | |
1660 | for i=0, 1, 0.08 / Animation_Speed do | |
1661 | Swait() | |
1662 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed) | |
1663 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(-20)), 0.3 / Animation_Speed) | |
1664 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.75 * Player_Size, 0 * Player_Size) * ANGLES(RAD(210), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1665 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1666 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed) | |
1667 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed) | |
1668 | end | |
1669 | HandleWeld.Part0 = RightArm | |
1670 | HandleWeld.C0 = CF(-0.05 * Player_Size, -1 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(-27), RAD(0), RAD(-19)) * ANGLES(RAD(0), RAD(110), RAD(0)) | |
1671 | CreateSound("174884033", HitboxPart, 1, 1.5) | |
1672 | for i=0, 1, 0.5 / Animation_Speed do | |
1673 | Swait() | |
1674 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed) | |
1675 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-2.5), RAD(0), RAD(30)), 0.3 / Animation_Speed) | |
1676 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(80)) * ANGLES(RAD(20), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1677 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1678 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed) | |
1679 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed) | |
1680 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-70), RAD(90), RAD(0)), 0.3 / Animation_Speed) | |
1681 | end | |
1682 | LASTPOINT = EffectPart.CFrame | |
1683 | for i=0, 1, 0.08 / Animation_Speed do | |
1684 | Swait() | |
1685 | TrailEffect("Institutional white", "Neon", EffectPart.CFrame, LASTPOINT, "Block", 0, 0.2, ANGLES(0, 0, 0), -0.01, 0, -0.01, 0.1) | |
1686 | LASTPOINT = EffectPart.CFrame | |
1687 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.4 / Animation_Speed) | |
1688 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-2.5), RAD(0), RAD(30)), 0.4 / Animation_Speed) | |
1689 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(80)) * ANGLES(RAD(-60), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1690 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1691 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.4 / Animation_Speed) | |
1692 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.4 / Animation_Speed) | |
1693 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-140), RAD(90), RAD(0)), 0.3 / Animation_Speed) | |
1694 | end | |
1695 | LASTPOINT = nil | |
1696 | --ATTACK = false | |
1697 | end | |
1698 | ||
1699 | function UnequipWeapon() | |
1700 | --ATTACK = true | |
1701 | for i=0, 1, 0.5 / Animation_Speed do | |
1702 | Swait() | |
1703 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed) | |
1704 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(-20)), 0.3 / Animation_Speed) | |
1705 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.75 * Player_Size, 0 * Player_Size) * ANGLES(RAD(140), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(45), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1706 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1707 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed) | |
1708 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed) | |
1709 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(-0.05 * Player_Size, -1 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(-27), RAD(0), RAD(-19)) * ANGLES(RAD(0), RAD(110), RAD(0)), 0.3 / Animation_Speed) | |
1710 | end | |
1711 | CreateSound("245542809", HitboxPart, 1, 1.2) | |
1712 | for i=0, 1, 0.08 / Animation_Speed do | |
1713 | Swait() | |
1714 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed) | |
1715 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(-20)), 0.3 / Animation_Speed) | |
1716 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.75 * Player_Size, 0 * Player_Size) * ANGLES(RAD(210), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1717 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1718 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed) | |
1719 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed) | |
1720 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(-0.05 * Player_Size, -1 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(-27), RAD(0), RAD(-19)) * ANGLES(RAD(0), RAD(110), RAD(0)), 0.3 / Animation_Speed) | |
1721 | end | |
1722 | HandleWeld.Part0 = Torso | |
1723 | HandleWeld.C0 = CF(2 * Player_Size, 2 * Player_Size, 0.6 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(135)) | |
1724 | for i=0, 1, 0.5 / Animation_Speed do | |
1725 | Swait() | |
1726 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.3 / Animation_Speed) | |
1727 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-2.5), RAD(0), RAD(30)), 0.3 / Animation_Speed) | |
1728 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.75 * Player_Size, 0 * Player_Size) * ANGLES(RAD(140), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(45), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1729 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1730 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(95), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.3 / Animation_Speed) | |
1731 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-55), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.3 / Animation_Speed) | |
1732 | end | |
1733 | for i=0, 1, 0.08 / Animation_Speed do | |
1734 | Swait() | |
1735 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
1736 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
1737 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
1738 | Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)), 0.3 / Animation_Speed) | |
1739 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1740 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1741 | if Disable_Moving_Arms == false then | |
1742 | RightShoulder.C1 = Clerp(RightShoulder.C1, ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5), 0.3 / Animation_Speed) | |
1743 | LeftShoulder.C1 = Clerp(LeftShoulder.C1, ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5), 0.3 / Animation_Speed) | |
1744 | else | |
1745 | RightShoulder.C1 = Clerp(RightShoulder.C1, CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size), 0.3 / Animation_Speed) | |
1746 | LeftShoulder.C1 = Clerp(LeftShoulder.C1, CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size), 0.3 / Animation_Speed) | |
1747 | end | |
1748 | 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.3 / Animation_Speed) | |
1749 | 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.3 / Animation_Speed) | |
1750 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
1751 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
1752 | end | |
1753 | RootJoint.C0 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
1754 | RootJoint.C1 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
1755 | Neck.C0 = NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
1756 | Neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
1757 | RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0 | |
1758 | LeftShoulder.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0 | |
1759 | if Disable_Moving_Arms == false then | |
1760 | RightShoulder.C1 = ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5) | |
1761 | LeftShoulder.C1 = ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5) | |
1762 | else | |
1763 | RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
1764 | LeftShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
1765 | end | |
1766 | 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)) | |
1767 | 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)) | |
1768 | RightHip.C1 = CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
1769 | LeftHip.C1 = CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
1770 | --ATTACK = false | |
1771 | DEFENSECHANGE1.Parent = ChangeStat | |
1772 | MOVEMENTCHANGE1.Parent = nil | |
1773 | end | |
1774 | ||
1775 | function StaggerHitAnimation() | |
1776 | ATTACK = true | |
1777 | if Weapon:FindFirstChild("Hitbox") ~= nil then | |
1778 | for i = 1, MRANDOM(2, 4) do | |
1779 | ClangEffect("Bright yellow", "Neon", CF(Weapon:FindFirstChild("Hitbox").Position) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), 20, 5, 0.2, MRANDOM(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1) | |
1780 | end | |
1781 | end | |
1782 | for i = 0, 1, 0.1 / Animation_Speed do | |
1783 | Swait() | |
1784 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-10), RAD(0), RAD(-30)), 0.3 / Animation_Speed) | |
1785 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(30)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
1786 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-30), RAD(0), RAD(60)) * ANGLES(RAD(0), RAD(-30), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1787 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-20)) * ANGLES(RAD(0), RAD(20), RAD(0)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1788 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.9 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-20)), 0.3 / Animation_Speed) | |
1789 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1.1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(10)), 0.3 / Animation_Speed) | |
1790 | if Stagger.Value == true or Stun.Value == true then | |
1791 | break | |
1792 | end | |
1793 | end | |
1794 | ATTACK = false | |
1795 | end | |
1796 | ||
1797 | function StaggerAnimation() | |
1798 | ATTACK = true | |
1799 | if Weapon:FindFirstChild("Hitbox") ~= nil then | |
1800 | for i = 1, MRANDOM(2, 4) do | |
1801 | ClangEffect("Bright yellow", "Neon", CF(Weapon:FindFirstChild("Hitbox").Position) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), 20, 5, 0.2, MRANDOM(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1) | |
1802 | end | |
1803 | end | |
1804 | DISABLEJUMPING = true | |
1805 | COMBO = 1 | |
1806 | StatLabel("Interruption", Head.CFrame * CF(0, 0 + (Head.Size.z - 1), 0), "Staggered!", C3(255 / 255, 255 / 255, 0)) | |
1807 | local STAGGERVELOCITY = Instance.new("BodyVelocity",Torso) | |
1808 | STAGGERVELOCITY.P = 500 | |
1809 | STAGGERVELOCITY.maxForce = VT(math.huge, 0, math.huge) | |
1810 | if Rooted.Value == false then | |
1811 | STAGGERVELOCITY.Velocity = RootPart.CFrame.lookVector * -40 | |
1812 | end | |
1813 | for i = 0, 1, 0.35 / Animation_Speed do | |
1814 | Swait() | |
1815 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.3 / Animation_Speed) | |
1816 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(2.5), RAD(0), RAD(20)), 0.3 / Animation_Speed) | |
1817 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size,0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1818 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size,0 * Player_Size) * ANGLES(RAD(-7.5), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1819 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size,0 * Player_Size) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(30)), 0.3 / Animation_Speed) | |
1820 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size,0 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(5)), 0.3 / Animation_Speed) | |
1821 | end | |
1822 | for i = 0, 1, 0.2 / Animation_Speed do | |
1823 | Swait() | |
1824 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-25), RAD(0), RAD(-20)), 0.4 / Animation_Speed) | |
1825 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.4 / Animation_Speed) | |
1826 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1827 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-7.5), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1828 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(50)), 0.4 / Animation_Speed) | |
1829 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(25)), 0.4 / Animation_Speed) | |
1830 | end | |
1831 | STAGGERVELOCITY.Parent = nil | |
1832 | for i = 1, 50 * Animation_Speed do | |
1833 | Swait() | |
1834 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -1.8 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-20)) * ANGLES(RAD(-5), RAD(-5), RAD(0)), 0.3 / Animation_Speed) | |
1835 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(5), RAD(0)), 0.3 / Animation_Speed) | |
1836 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(20)) * ANGLES(RAD(0), RAD(-20), RAD(0)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1837 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(-10)) * ANGLES(RAD(0), RAD(15), RAD(0)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1838 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.4 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(70)) * ANGLES(RAD(0), RAD(30), RAD(0)), 0.3 / Animation_Speed) | |
1839 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, 0.5 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(-10)), 0.3 / Animation_Speed) | |
1840 | end | |
1841 | DISABLEJUMPING = false | |
1842 | ATTACK = false | |
1843 | end | |
1844 | ||
1845 | function StunAnimation() | |
1846 | ATTACK = true | |
1847 | DISABLEJUMPING = true | |
1848 | COMBO = 1 | |
1849 | StatLabel("Interruption", Head.CFrame * CF(0, 0 + (Head.Size.z - 1), 0), "Stunned!", C3(255 / 255, 255 / 255, 0)) | |
1850 | for i = 0, 1, 0.3 / Animation_Speed do | |
1851 | Swait() | |
1852 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(15), RAD(0), RAD(-150)), 0.3 / Animation_Speed) | |
1853 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-10), RAD(0), RAD(-20)), 0.3 / Animation_Speed) | |
1854 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(30), RAD(0), RAD(40)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1855 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-50)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1856 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(30)), 0.3 / Animation_Speed) | |
1857 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(20)), 0.3 / Animation_Speed) | |
1858 | end | |
1859 | for i = 0, 1, 0.3 / Animation_Speed do | |
1860 | Swait() | |
1861 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.05 * Player_Size) * ANGLES(RAD(45), RAD(0), RAD(-180)), 0.4 / Animation_Speed) | |
1862 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-15), RAD(0), RAD(-30)), 0.4 / Animation_Speed) | |
1863 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(30), RAD(0), RAD(40)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1864 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(0), RAD(-50)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1865 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(15)), 0.4 / Animation_Speed) | |
1866 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(50)), 0.4 / Animation_Speed) | |
1867 | end | |
1868 | for i = 0, 1, 0.3 / Animation_Speed do | |
1869 | Swait() | |
1870 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(75), RAD(0), RAD(-180)), 0.4 / Animation_Speed) | |
1871 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-15), RAD(0), RAD(-60)), 0.4 / Animation_Speed) | |
1872 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(20), RAD(0), RAD(70)) * ANGLES(RAD(0), RAD(30), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1873 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-10), RAD(0), RAD(-80)) * ANGLES(RAD(0), RAD(-40), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1874 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-15), RAD(0), RAD(10)), 0.4 / Animation_Speed) | |
1875 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(80)), 0.4 / Animation_Speed) | |
1876 | end | |
1877 | for i = 1, 70 * Animation_Speed do | |
1878 | Swait() | |
1879 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -2.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-180)), 0.3 / Animation_Speed) | |
1880 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-90)), 0.3 / Animation_Speed) | |
1881 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(-10), RAD(90)) * RIGHTSHOULDERC0, 0.3 / Animation_Speed) | |
1882 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.3 / Animation_Speed) | |
1883 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
1884 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(0)), 0.3 / Animation_Speed) | |
1885 | end | |
1886 | for i = 0, 1, 0.2 / Animation_Speed do | |
1887 | Swait() | |
1888 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -1.5 * Player_Size) * ANGLES(RAD(20), RAD(0), RAD(100)), 0.4 / Animation_Speed) | |
1889 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-30)), 0.4 / Animation_Speed) | |
1890 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-20), RAD(-10), RAD(30)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1891 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(80), RAD(0), RAD(20)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1892 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(70)), 0.4 / Animation_Speed) | |
1893 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.25 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(20)), 0.4 / Animation_Speed) | |
1894 | end | |
1895 | DISABLEJUMPING = false | |
1896 | ATTACK = false | |
1897 | end | |
1898 | ||
1899 | function EAbility() | |
1900 | ATTACK = true | |
1901 | ATTACK = false | |
1902 | end | |
1903 | ||
1904 | function Attack1() | |
1905 | ATTACK = true | |
1906 | for i=0, 1, 0.1 / Animation_Speed do | |
1907 | Swait() | |
1908 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(-40)), 0.4 / Animation_Speed) | |
1909 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5), RAD(0), RAD(35)), 0.4 / Animation_Speed) | |
1910 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(150), RAD(0), RAD(-20)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1911 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-0.25 * Player_Size, 0.5 * Player_Size, -0.75 * Player_Size) * ANGLES(RAD(160), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1912 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-5)), 0.4 / Animation_Speed) | |
1913 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.075 * Player_Size) * ANGLES(RAD(0), RAD(-45), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(-15)), 0.4 / Animation_Speed) | |
1914 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-80), RAD(90), RAD(0)), 0.4 / Animation_Speed) | |
1915 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
1916 | break | |
1917 | end | |
1918 | end | |
1919 | CreateSound("553461842", HitboxPart, 1.2, MRANDOM(8, 9) / 10) | |
1920 | local HASHITFLOOR = false | |
1921 | for i=0, 1, 0.1 / Animation_Speed do | |
1922 | Swait() | |
1923 | local Pos = HitboxPart | |
1924 | local Offset = HitboxPart.CFrame * CF(0, 0.1 * Player_Size, 0) | |
1925 | local Color = "Institutional white" | |
1926 | local Material = "Neon" | |
1927 | local TheDelay = 0.01 | |
1928 | local Height = 6.2 * Player_Size | |
1929 | BLCF = Offset | |
1930 | if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then | |
1931 | local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay) | |
1932 | if a then game:GetService("Debris"):AddItem(a, 1) end | |
1933 | if b then game:GetService("Debris"):AddItem(b, 1) end | |
1934 | local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay) | |
1935 | if a then game:GetService("Debris"):AddItem(a, 1) end | |
1936 | if b then game:GetService("Debris"):AddItem(b, 1) end | |
1937 | SCFR = BLCF | |
1938 | elseif not SCFR then | |
1939 | SCFR = BLCF | |
1940 | end | |
1941 | local SWORDHIT, SWORDPOS = Raycast(EffectPart.Position, (CF(EffectPart.Position, EffectPart.Position + VT(0, -1, 0))).lookVector, 1 * Player_Size, Character) | |
1942 | if SWORDHIT ~= nil and HASHITFLOOR == false and SWORDHIT.Parent:FindFirstChild("Humanoid") == nil then | |
1943 | HASHITFLOOR = true | |
1944 | --print(SWORDHIT.Material) | |
1945 | if SWORDHIT.Material == Enum.Material.Grass or SWORDHIT.Material == Enum.Material.Ice or SWORDHIT.Material == Enum.Material.Fabric or SWORDHIT.Material == Enum.Material.SmoothPlastic or SWORDHIT.Material == Enum.Material.Sand or SWORDHIT.Material == Enum.Material.Plastic or SWORDHIT.Material == Enum.Material.Neon or SWORDHIT.Material == Enum.Material.Foil then | |
1946 | CreateSound("525717773", EffectPart, 1.2 , MRANDOM(8, 12) / 10) | |
1947 | elseif SWORDHIT.Material == Enum.Material.Metal or SWORDHIT.Material == Enum.Material.Concrete or SWORDHIT.Material == Enum.Material.Brick or SWORDHIT.Material == Enum.Material.CorrodedMetal or SWORDHIT.Material == Enum.Material.Slate or SWORDHIT.Material == Enum.Material.Marble or SWORDHIT.Material == Enum.Material.Granite or SWORDHIT.Material == Enum.Material.DiamondPlate or SWORDHIT.Material == Enum.Material.Pebble or SWORDHIT.Material == Enum.Material.Cobblestone then | |
1948 | CreateSound("470790670", EffectPart, 1 , MRANDOM(8, 12) / 10) | |
1949 | for i = 1, MRANDOM(2, 4) do | |
1950 | ClangEffect("Bright yellow", "Neon", CF(SWORDPOS) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), 10, 3, 0.2, MRANDOM(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1) | |
1951 | end | |
1952 | elseif SWORDHIT.Material == Enum.Material.Wood or SWORDHIT.Material == Enum.Material.WoodPlanks then | |
1953 | CreateSound("514586161", EffectPart, 1 , MRANDOM(8, 12) / 10) | |
1954 | end | |
1955 | end | |
1956 | MagnitudeDamage(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, HitboxPart, 4, false, 5, 10, MRANDOM(5, 10), "Normal", RootPart, 0.5, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false) | |
1957 | if HASHITFLOOR == true then | |
1958 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(30)), 0.4 / Animation_Speed) | |
1959 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-20)), 0.4 / Animation_Speed) | |
1960 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(40), RAD(0), RAD(5)) * ANGLES(RAD(0), RAD(-30), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1961 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(0 * Player_Size, 0.25 * Player_Size, -0.75 * Player_Size) * ANGLES(RAD(20), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1962 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.075 * Player_Size) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(17.5)), 0.4 / Animation_Speed) | |
1963 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(5)), 0.4 / Animation_Speed) | |
1964 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-132.5), RAD(90), RAD(0)), 0.4 / Animation_Speed) | |
1965 | else | |
1966 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(30)), 0.4 / Animation_Speed) | |
1967 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-20)), 0.4 / Animation_Speed) | |
1968 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(30), RAD(0), RAD(5)) * ANGLES(RAD(0), RAD(-30), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1969 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(0 * Player_Size, 0.25 * Player_Size, -0.75 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1970 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.075 * Player_Size) * ANGLES(RAD(0), RAD(50), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(17.5)), 0.4 / Animation_Speed) | |
1971 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-70), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(5)), 0.4 / Animation_Speed) | |
1972 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-150), RAD(90), RAD(0)), 0.4 / Animation_Speed) | |
1973 | end | |
1974 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
1975 | break | |
1976 | end | |
1977 | end | |
1978 | BLCF = nil | |
1979 | SCFR = nil | |
1980 | ATTACK = false | |
1981 | end | |
1982 | ||
1983 | function Attack2() | |
1984 | ATTACK = true | |
1985 | for i=0, 1, 0.1 / Animation_Speed do | |
1986 | Swait() | |
1987 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(20)), 0.4 / Animation_Speed) | |
1988 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-15)), 0.4 / Animation_Speed) | |
1989 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.25 * Player_Size, 0.5 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1990 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-25), RAD(0), RAD(-35)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1991 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(65), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(15)), 0.4 / Animation_Speed) | |
1992 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.4 / Animation_Speed) | |
1993 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-110), RAD(90), RAD(0)), 0.4 / Animation_Speed) | |
1994 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
1995 | break | |
1996 | end | |
1997 | end | |
1998 | CreateSound("553461718", HitboxPart, 1.2, MRANDOM(7, 9) / 10) | |
1999 | for i=0, 1, 0.1 / Animation_Speed do | |
2000 | Swait() | |
2001 | local Pos = HitboxPart | |
2002 | local Offset = HitboxPart.CFrame * CF(0, 0.1 * Player_Size, 0) | |
2003 | local Color = "Institutional white" | |
2004 | local Material = "Neon" | |
2005 | local TheDelay = 0.01 | |
2006 | local Height = 6.2 * Player_Size | |
2007 | BLCF = Offset | |
2008 | if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then | |
2009 | local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay) | |
2010 | if a then game:GetService("Debris"):AddItem(a, 1) end | |
2011 | if b then game:GetService("Debris"):AddItem(b, 1) end | |
2012 | local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay) | |
2013 | if a then game:GetService("Debris"):AddItem(a, 1) end | |
2014 | if b then game:GetService("Debris"):AddItem(b, 1) end | |
2015 | SCFR = BLCF | |
2016 | elseif not SCFR then | |
2017 | SCFR = BLCF | |
2018 | end | |
2019 | MagnitudeDamage(HITWEAPONSOUNDS[MRANDOM(1, #HITWEAPONSOUNDS)], HITARMORSOUNDS[MRANDOM(1, #HITARMORSOUNDS)], HITBLOCKSOUNDS[MRANDOM(1, #HITBLOCKSOUNDS)], HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], 1, 1, 1, 1, HitboxPart, 4, false, 5, 10, MRANDOM(5, 10), "Normal", RootPart, 0.5, 1, MRANDOM(5, 10), nil, true, false, nil, 0, 0, false) | |
2020 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(-30)), 0.4 / Animation_Speed) | |
2021 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(2.5), RAD(0), RAD(30)), 0.4 / Animation_Speed) | |
2022 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(100)) * ANGLES(RAD(-30), RAD(80), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
2023 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-15), RAD(0), RAD(-55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
2024 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(5)), 0.4 / Animation_Speed) | |
2025 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-65), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-15)), 0.4 / Animation_Speed) | |
2026 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-130), RAD(90), RAD(0)), 0.4 / Animation_Speed) | |
2027 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
2028 | break | |
2029 | end | |
2030 | end | |
2031 | BLCF = nil | |
2032 | SCFR = nil | |
2033 | ATTACK = false | |
2034 | end | |
2035 | ||
2036 | function ShootFireball(POSITION1, POSITION2, SPEED, SIZE, DURATION, LOWDAMAGE, HIGHDAMAGE) | |
2037 | local POS1 = POSITION1 | |
2038 | local POS2 = POSITION2 | |
2039 | local MOUSELOOK = CF((POS1 + POS2) / 2, POS2) | |
2040 | local FIREBALLSPEED = SPEED * Player_Size | |
2041 | local FIREBALLDURATION = DURATION | |
2042 | local FIREBALLCOLORS = {"Bright red", "Bright orange", "Bright yellow"} | |
2043 | local FIREBALLHITSOUNDS = {"522282998", "527535379", "304448425"} | |
2044 | coroutine.resume(coroutine.create(function() | |
2045 | repeat | |
2046 | Swait() | |
2047 | local FIREBALLHIT, FIREBALLPOS = Raycast(POS1, MOUSELOOK.lookVector, FIREBALLSPEED, Character) | |
2048 | POS1 = POS1 + (MOUSELOOK.lookVector * FIREBALLSPEED) | |
2049 | MagicBlock(FIREBALLCOLORS[MRANDOM(1, #FIREBALLCOLORS)], "Neon", CF(POS1) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), SIZE, SIZE, SIZE, SIZE / -10, SIZE / -10, SIZE / -10, 0.1) | |
2050 | if FIREBALLHIT ~= nil or FIREBALLDURATION <= 0.1 then | |
2051 | FIREBALLDURATION = 0 | |
2052 | local FireballHitRefpart = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
2053 | FireballHitRefpart.Anchored = true | |
2054 | FireballHitRefpart.CFrame = CF(FIREBALLPOS) | |
2055 | game:GetService("Debris"):AddItem(FireballHitRefpart, 5) | |
2056 | CreateSound(FIREBALLHITSOUNDS[MRANDOM(1, #FIREBALLHITSOUNDS)], FireballHitRefpart, 1.4, MRANDOM(14, 16) / 10) | |
2057 | for i = 1, MRANDOM(4, 8) do | |
2058 | MagicBlock(FIREBALLCOLORS[MRANDOM(1, #FIREBALLCOLORS)], "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360)), RAD(MRANDOM(-360, 360))), CF(0, MRANDOM(5, 7) / 10 * Player_Size, 0), VT(0, 0, 0), 5, 5, 5, 0, 0, 0, MRANDOM(3, 5) / 100) | |
2059 | end | |
2060 | MagicBlock("Bright red", "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), SIZE, SIZE, SIZE, SIZE / 3, SIZE / 3, SIZE / 3, 0.05) | |
2061 | MagicBlock("Bright orange", "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), SIZE * 0.5, SIZE * 0.5, SIZE * 0.5, SIZE / 4, SIZE / 4, SIZE / 4, 0.05) | |
2062 | MagicBlock("Bright yellow", "Neon", FireballHitRefpart.CFrame * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5)), RAD(MRANDOM(-5, 5))), VT(0, 0, 0), SIZE * 0.25, SIZE * 0.25, SIZE * 0.25, SIZE / 5, SIZE / 5, SIZE / 5, 0.05) | |
2063 | MagnitudeDamage("", "", "", "", 1, 1, 1, 1, FireballHitRefpart, SIZE / 2, false, LOWDAMAGE, HIGHDAMAGE, 0, "Normal", RootPart, 0, 1, MRANDOM(10, 15), nil, false, true, nil, 0, 0, false) | |
2064 | else | |
2065 | FIREBALLDURATION = FIREBALLDURATION - (1 / 30) / Animation_Speed | |
2066 | end | |
2067 | until FIREBALLHIT ~= nil or FIREBALLDURATION <= 0 | |
2068 | end)) | |
2069 | end | |
2070 | ||
2071 | function FirePillar(POSITION1, POSITION2, SIZE, RISE, RANGE, LOWDAMAGE, HIGHDAMAGE, LASTINGTIME) | |
2072 | local POS1 = POSITION1 | |
2073 | local POS2 = POSITION2 | |
2074 | local MOUSELOOK = CF((POS1 + POS2) / 2, POS2) | |
2075 | local FIREPILLARHITSOUNDS = {"171378971", --[["646619365",--]] "472579737"--[[, "144140670"--]]} | |
2076 | local FIREPILLARCOLORS = {"Bright red", "Bright orange", "Bright yellow"} | |
2077 | local FIREPILLAR1HIT, FIREPILLAR1POS = Raycast(POS1, MOUSELOOK.lookVector, RANGE * Player_Size, Character) | |
2078 | local FirePillarRefpart1 = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
2079 | FirePillarRefpart1.Anchored = true | |
2080 | FirePillarRefpart1.CFrame = CF(FIREPILLAR1POS) * CF(0, 10, 0) | |
2081 | game:GetService("Debris"):AddItem(FirePillarRefpart1, 5) | |
2082 | local FIREPILLAR2HIT, FIREPILLAR2POS = Raycast(FirePillarRefpart1.Position, CF(FirePillarRefpart1.Position, FirePillarRefpart1.Position + VT(0, -1, 0)).lookVector, 999, Character) | |
2083 | if FIREPILLAR2HIT ~= nil then | |
2084 | FirePillarRefpart1.Parent = nil | |
2085 | local FirePillarRefpart2 = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
2086 | FirePillarRefpart2.Anchored = true | |
2087 | FirePillarRefpart2.CFrame = CF(FIREPILLAR2POS) | |
2088 | game:GetService("Debris"):AddItem(FirePillarRefpart2, 5) | |
2089 | CreateSound(FIREPILLARHITSOUNDS[MRANDOM(1, #FIREPILLARHITSOUNDS)], FirePillarRefpart2, 1.2, MRANDOM(11, 13) / 10) | |
2090 | for i = 1, MRANDOM(5, 10) do | |
2091 | MagicBlock(FIREPILLARCOLORS[MRANDOM(1, #FIREPILLARCOLORS)], "Neon", FirePillarRefpart2.CFrame * ANGLES(RAD(MRANDOM(-60, 60)), 0, RAD(MRANDOM(-60, 60))), CF(0, MRANDOM(5, 7) / 10 * Player_Size, 0), VT(0, 0, 0), 3, 3, 3, 0, 0, 0, MRANDOM(3, 5) / 100) | |
2092 | end | |
2093 | for i = 1, MRANDOM(15, 20) do | |
2094 | local FIREEFFECTSIZE = MRANDOM(1, 2) | |
2095 | MagicBlock(FIREPILLARCOLORS[MRANDOM(1, #FIREPILLARCOLORS)], "Neon", FirePillarRefpart2.CFrame, CF(0, MRANDOM(5, 10) / 100, 0) * ANGLES(0, RAD(MRANDOM(-20, 20)), 0), VT(MRANDOM(SIZE / 6, SIZE / 4), 0, 0), FIREEFFECTSIZE, FIREEFFECTSIZE, FIREEFFECTSIZE, -0.02, -0.02, -0.02, MRANDOM(1, 2) / 100) | |
2096 | end | |
2097 | MagicCylinder("Bright red", "Neon", CF(FIREPILLAR2POS), ANGLES(0, 0, 0), VT(0, 0, 0), SIZE, 0.1, SIZE, 1.5, 0, 1.5, LASTINGTIME) | |
2098 | MagicSphere("Bright red", "Neon", FirePillarRefpart2.CFrame, ANGLES(0, 0, 0), VT(0, 0, 0), SIZE, 0.1, SIZE, 1.5, RISE, 1.5, LASTINGTIME) | |
2099 | MagicSphere("Bright orange", "Neon", FirePillarRefpart2.CFrame, ANGLES(0, 0, 0), VT(0, 0, 0), SIZE * 0.5, 0.1, SIZE * 0.5, 1.5, RISE * 0.75, 1.5, LASTINGTIME) | |
2100 | MagicSphere("Bright yellow", "Neon", FirePillarRefpart2.CFrame, ANGLES(0, 0, 0), VT(0, 0, 0), SIZE * 0.25, 0.1, SIZE * 0.25, 1.5, RISE * 0.375, 1.5, LASTINGTIME) | |
2101 | MagnitudeDamage("", "", "", "", 1, 1, 1, 1, FirePillarRefpart2, SIZE / 3, false, LOWDAMAGE, HIGHDAMAGE, 0, "Normal", RootPart, 0, 1, MRANDOM(10, 15), nil, false, true, "Movement", -0.1, 3, true) | |
2102 | end | |
2103 | end | |
2104 | ||
2105 | function Attack3() | |
2106 | ATTACK = true | |
2107 | local FIREEFFECTCOLORS = {"Bright red", "Bright orange", "Bright yellow"} | |
2108 | for i=0, 1, 0.1 / Animation_Speed do | |
2109 | Swait() | |
2110 | for i = 1, 2 do | |
2111 | MagicBlock(FIREEFFECTCOLORS[MRANDOM(1, #FIREEFFECTCOLORS)], "Neon", LeftArm.CFrame * CF(0, MRANDOM(-10, 10) / 10 * Player_Size, 0) * ANGLES(RAD(90), 0, RAD(MRANDOM(-360, 360))), CF(0, 0, 0.1) * ANGLES(0, 0, RAD(MRANDOM(-20, 20))), VT(0, 1, 0), 1, 1, 1, -0.05, -0.05, -0.05, 0.05) | |
2112 | end | |
2113 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-60)), 0.4 / Animation_Speed) | |
2114 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(60)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
2115 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
2116 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-55)) * ANGLES(RAD(5), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
2117 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.4 / Animation_Speed) | |
2118 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, 0.05 * Player_Size) * ANGLES(RAD(0), RAD(-40), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-10)), 0.4 / Animation_Speed) | |
2119 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-20), RAD(90), RAD(0)), 0.4 / Animation_Speed) | |
2120 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
2121 | break | |
2122 | end | |
2123 | end | |
2124 | CreateSound("154324879", LeftArm, 1.4, 1.5) | |
2125 | ShootFireball((LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size)).p, Mouse.hit.p, 1, 10, 2.1, 5, 10) | |
2126 | MagicBlock("Bright red", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 5, 5, 5, 0.5, 0.5, 0.5, 0.05) | |
2127 | MagicBlock("Bright orange", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.05) | |
2128 | MagicBlock("Bright yellow", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 0.05, 0.05, 0.05, 0.5, 0.5, 0.5, 0.05) | |
2129 | for i=0, 1, 0.1 / Animation_Speed do | |
2130 | Swait() | |
2131 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-50)), 0.4 / Animation_Speed) | |
2132 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(50)) * ANGLES(RAD(2.5), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
2133 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
2134 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25 * Player_Size, 0.25 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-55)) * ANGLES(RAD(40), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
2135 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-12.5), RAD(0), RAD(-5)), 0.4 / Animation_Speed) | |
2136 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.05 * Player_Size) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-5)), 0.4 / Animation_Speed) | |
2137 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-20), RAD(90), RAD(0)), 0.4 / Animation_Speed) | |
2138 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
2139 | break | |
2140 | end | |
2141 | end | |
2142 | ATTACK = false | |
2143 | end | |
2144 | ||
2145 | function Attack4() | |
2146 | ATTACK = true | |
2147 | local FIREEFFECTCOLORS = {"Bright red", "Bright orange", "Bright yellow"} | |
2148 | for i=0, 1, 0.1 / Animation_Speed do | |
2149 | Swait() | |
2150 | MagicBlock(FIREEFFECTCOLORS[MRANDOM(1, #FIREEFFECTCOLORS)], "Neon", LeftArm.CFrame * CF(0 * Player_Size, MRANDOM(-15, -10) / 10 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), 0, RAD(MRANDOM(-360, 360))), CF(0, 0, -0.1) * ANGLES(0, 0, RAD(MRANDOM(-20, 20))), VT(0, 1, 0), 1, 1, 1, -0.05, -0.05, -0.05, 0.05) | |
2151 | --MagicBlock(FIREEFFECTCOLORS[MRANDOM(1, #FIREEFFECTCOLORS)], "Neon", RootPart.CFrame * CF(0 * Player_Size, MRANDOM(-2, 2) * Player_Size, 0 * Player_Size) * ANGLES(0, RAD(MRANDOM(-360, 360)), 0), CF(0, MRANDOM(5, 10) / 100, 0) * ANGLES(0, RAD(MRANDOM(-10, 10)), 0), VT(MRANDOM(20, 40) / 10, 0, 0), 1, 1, 1, -0.05, -0.05, -0.05, 0.05) | |
2152 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-40)), 0.4 / Animation_Speed) | |
2153 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(35)) * ANGLES(RAD(2.5), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
2154 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
2155 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.75 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(50)) * ANGLES(RAD(80), RAD(-20), RAD(-30)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
2156 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-5)), 0.4 / Animation_Speed) | |
2157 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, 0.05 * Player_Size) * ANGLES(RAD(0), RAD(-40), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-10)), 0.4 / Animation_Speed) | |
2158 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-20), RAD(90), RAD(0)), 0.4 / Animation_Speed) | |
2159 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
2160 | break | |
2161 | end | |
2162 | end | |
2163 | CreateSound("549224856", LeftArm, 1, MRANDOM(11, 13) / 10) | |
2164 | FirePillar(RootPart.Position, Mouse.hit.p, 25, 7.5, 20, 5, 10, 0.025) | |
2165 | MagicBlock("Bright red", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 5, 5, 5, 0.5, 0.5, 0.5, 0.05) | |
2166 | MagicBlock("Bright orange", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.05) | |
2167 | MagicBlock("Bright yellow", "Neon", LeftArm.CFrame * CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50)), RAD(MRANDOM(-50, 50))), ANGLES(0, 0, 0), VT(0, 0, 0), 0.05, 0.05, 0.05, 0.5, 0.5, 0.5, 0.05) | |
2168 | for i=0, 1, 0.1 / Animation_Speed do | |
2169 | Swait() | |
2170 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.4 / Animation_Speed) | |
2171 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(25)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
2172 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
2173 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.25 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-20 + MRANDOM(-2.5, 2.5))) * ANGLES(RAD(70 + MRANDOM(-2.5, 2.5)), RAD(40), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
2174 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-10), RAD(0), RAD(-7.5)), 0.4 / Animation_Speed) | |
2175 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, 0.05 * Player_Size) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-2.5), RAD(0), RAD(-12.5)), 0.4 / Animation_Speed) | |
2176 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-20), RAD(90), RAD(0)), 0.4 / Animation_Speed) | |
2177 | --[[ | |
2178 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(40)), 0.4 / Animation_Speed) | |
2179 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-30)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
2180 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
2181 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-10 + MRANDOM(-2.5, 2.5))) * ANGLES(RAD(40 + MRANDOM(-2.5, 2.5)), RAD(70), RAD(20)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
2182 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(60), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(10)), 0.4 / Animation_Speed) | |
2183 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(5)), 0.4 / Animation_Speed) | |
2184 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(-20), RAD(90), RAD(0)), 0.4 / Animation_Speed) | |
2185 | --]] | |
2186 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
2187 | break | |
2188 | end | |
2189 | end | |
2190 | ATTACK = false | |
2191 | end | |
2192 | ||
2193 | function Move1() | |
2194 | ATTACK = true | |
2195 | ATTACK = false | |
2196 | end | |
2197 | ||
2198 | function Move2() | |
2199 | ATTACK = true | |
2200 | ATTACK = false | |
2201 | end | |
2202 | ||
2203 | function Move3() | |
2204 | ATTACK = true | |
2205 | ATTACK = false | |
2206 | end | |
2207 | ||
2208 | function Move4() | |
2209 | ATTACK = true | |
2210 | ATTACK = false | |
2211 | end | |
2212 | ||
2213 | --//=================================\\ | |
2214 | --\\=================================// | |
2215 | ||
2216 | ||
2217 | ||
2218 | ||
2219 | ||
2220 | --//=================================\\ | |
2221 | --|| SET THINGS UP | |
2222 | --\\=================================// | |
2223 | ||
2224 | if Start_Equipped == true then | |
2225 | ATTACK = true | |
2226 | EQUIPPED = true | |
2227 | if Disable_Animate == true then | |
2228 | ANIMATE.Parent = nil | |
2229 | local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION) | |
2230 | IDLEANIMATION:Play() | |
2231 | end | |
2232 | if Disable_Animator == true then | |
2233 | ANIMATOR.Parent = nil | |
2234 | end | |
2235 | if Disable_Moving_Arms == true then | |
2236 | RSH = Torso["Right Shoulder"] | |
2237 | LSH = Torso["Left Shoulder"] | |
2238 | RSH.Parent = nil | |
2239 | LSH.Parent = nil | |
2240 | if Use_Motors_Instead_Of_Welds == true then | |
2241 | RightShoulder = IT("Motor") | |
2242 | LeftShoulder = IT("Motor") | |
2243 | else | |
2244 | RightShoulder = IT("Weld") | |
2245 | LeftShoulder = IT("Weld") | |
2246 | end | |
2247 | RightShoulder.Name = "Right Shoulder" | |
2248 | RightShoulder.Part0 = Torso | |
2249 | RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
2250 | RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
2251 | RightShoulder.Part1 = Character["Right Arm"] | |
2252 | RightShoulder.Parent = Torso | |
2253 | LeftShoulder.Name = "Left Shoulder" | |
2254 | LeftShoulder.Part0 = Torso | |
2255 | LeftShoulder.C0=CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
2256 | LeftShoulder.C1=CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
2257 | LeftShoulder.Part1 = Character["Left Arm"] | |
2258 | LeftShoulder.Parent = Torso | |
2259 | RIGHTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
2260 | LEFTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
2261 | end | |
2262 | if Start_Equipped_With_Equipped_Animation == true then | |
2263 | Swait() | |
2264 | EquipWeapon() | |
2265 | end | |
2266 | ATTACK = false | |
2267 | end | |
2268 | ||
2269 | --//=================================\\ | |
2270 | --\\=================================// | |
2271 | ||
2272 | ||
2273 | ||
2274 | ||
2275 | ||
2276 | --//=================================\\ | |
2277 | --|| ASSIGN THINGS TO KEYS | |
2278 | --\\=================================// | |
2279 | ||
2280 | Humanoid.Changed:connect(function(Jump) | |
2281 | if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then | |
2282 | Humanoid.Jump = false | |
2283 | end | |
2284 | end) | |
2285 | ||
2286 | function MouseDown(Mouse) | |
2287 | if ATTACK == true or EQUIPPED == false then | |
2288 | return | |
2289 | end | |
2290 | HOLD = true | |
2291 | if COMBO == 1 then | |
2292 | COMBO = 2 | |
2293 | Attack1() | |
2294 | elseif COMBO == 2 then | |
2295 | COMBO = 3 | |
2296 | Attack2() | |
2297 | elseif COMBO == 3 then | |
2298 | COMBO = 4 | |
2299 | Attack3() | |
2300 | elseif COMBO == 4 then | |
2301 | COMBO = 1 | |
2302 | Attack4() | |
2303 | end | |
2304 | coroutine.resume(coroutine.create(function() | |
2305 | for i=1, 50 do | |
2306 | if ATTACK == false then | |
2307 | Swait() | |
2308 | end | |
2309 | end | |
2310 | if ATTACK == false then | |
2311 | COMBO = 1 | |
2312 | end | |
2313 | end)) | |
2314 | end | |
2315 | ||
2316 | function MouseUp(Mouse) | |
2317 | HOLD = false | |
2318 | end | |
2319 | ||
2320 | function KeyDown(Key) | |
2321 | if Key == "f" and Can_Equip_Or_Unequip == true and ATTACK == false then | |
2322 | ATTACK = true | |
2323 | COMBO = 1 | |
2324 | if EQUIPPED == false then | |
2325 | EQUIPPED = true | |
2326 | if Disable_Animate == true then | |
2327 | ANIMATE.Parent = nil | |
2328 | local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION) | |
2329 | IDLEANIMATION:Play() | |
2330 | end | |
2331 | if Disable_Animator == true then | |
2332 | ANIMATOR.Parent = nil | |
2333 | end | |
2334 | if Disable_Moving_Arms == true then | |
2335 | RSH = Torso["Right Shoulder"] | |
2336 | LSH = Torso["Left Shoulder"] | |
2337 | RSH.Parent = nil | |
2338 | LSH.Parent = nil | |
2339 | if Use_Motors_Instead_Of_Welds == true then | |
2340 | RightShoulder = IT("Motor") | |
2341 | LeftShoulder = IT("Motor") | |
2342 | else | |
2343 | RightShoulder = IT("Weld") | |
2344 | LeftShoulder = IT("Weld") | |
2345 | end | |
2346 | RightShoulder.Name = "Right Shoulder" | |
2347 | RightShoulder.Part0 = Torso | |
2348 | RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
2349 | RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
2350 | RightShoulder.Part1 = Character["Right Arm"] | |
2351 | RightShoulder.Parent = Torso | |
2352 | LeftShoulder.Name = "Left Shoulder" | |
2353 | LeftShoulder.Part0 = Torso | |
2354 | LeftShoulder.C0=CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
2355 | LeftShoulder.C1=CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
2356 | LeftShoulder.Part1 = Character["Left Arm"] | |
2357 | LeftShoulder.Parent = Torso | |
2358 | RIGHTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
2359 | LEFTSHOULDERC0 = CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
2360 | end | |
2361 | Swait() | |
2362 | EquipWeapon() | |
2363 | elseif EQUIPPED == true then | |
2364 | EQUIPPED = false | |
2365 | UnequipWeapon() | |
2366 | if Disable_Animator == true then | |
2367 | ANIMATOR.Parent = Humanoid | |
2368 | end | |
2369 | if Disable_Animate == true then | |
2370 | ANIMATE.Parent = Character | |
2371 | end | |
2372 | Swait() | |
2373 | if Disable_Moving_Arms == true then | |
2374 | RightShoulder.Parent = nil | |
2375 | LeftShoulder.Parent = nil | |
2376 | RSH.Parent = Torso | |
2377 | LSH.Parent = Torso | |
2378 | end | |
2379 | end | |
2380 | ATTACK = false | |
2381 | end | |
2382 | if Key == "e" and EQUIPPED == true and ATTACK == false then | |
2383 | EAbility() | |
2384 | end | |
2385 | if Key == "z" and EQUIPPED == true and ATTACK == false and CO1 >= Cooldown_1 and Mana.Value >= Skill_1_Mana_Cost then | |
2386 | Mana.Value = Mana.Value - Skill_1_Mana_Cost | |
2387 | CO1 = 0 | |
2388 | Move1() | |
2389 | end | |
2390 | if Key == "x" and EQUIPPED == true and ATTACK == false and CO2 >= Cooldown_2 and Mana.Value >= Skill_2_Mana_Cost then | |
2391 | Mana.Value = Mana.Value - Skill_2_Mana_Cost | |
2392 | CO2 = 0 | |
2393 | Move2() | |
2394 | end | |
2395 | if Key == "c" and EQUIPPED == true and ATTACK == false and CO3 >= Cooldown_3 and Mana.Value >= Skill_3_Mana_Cost then | |
2396 | Mana.Value = Mana.Value - Skill_3_Mana_Cost | |
2397 | CO3 = 0 | |
2398 | Move3() | |
2399 | end | |
2400 | if Key == "v" and EQUIPPED == true and ATTACK == false and CO4 >= Cooldown_4 and Mana.Value >= Skill_4_Mana_Cost then | |
2401 | Mana.Value = Mana.Value - Skill_4_Mana_Cost | |
2402 | CO4 = 0 | |
2403 | Move4() | |
2404 | end | |
2405 | if Player.UserId == game.CreatorId or Player.Name == "Player1" or Player.Name == "Player2" or Player.Name == "Brannon1964802" then | |
2406 | if Key == "q" then | |
2407 | Mana.Value = Max_Mana | |
2408 | SecondaryMana.Value = Max_Secondary_Mana | |
2409 | CO1 = Cooldown_1 | |
2410 | CO2 = Cooldown_2 | |
2411 | CO3 = Cooldown_3 | |
2412 | CO4 = Cooldown_4 | |
2413 | end | |
2414 | if Key == "p" then | |
2415 | StaggerHit.Value = true | |
2416 | end | |
2417 | if Key == "[" then | |
2418 | Stagger.Value = true | |
2419 | end | |
2420 | if Key == "]" then | |
2421 | Stun.Value = true | |
2422 | end | |
2423 | end | |
2424 | end | |
2425 | ||
2426 | function KeyUp(Key) | |
2427 | end | |
2428 | ||
2429 | if Use_HopperBin == false then | |
2430 | ||
2431 | Mouse.Button1Down:connect(function(NEWKEY) | |
2432 | MouseDown(NEWKEY) | |
2433 | end) | |
2434 | Mouse.Button1Up:connect(function(NEWKEY) | |
2435 | MouseUp(NEWKEY) | |
2436 | end) | |
2437 | Mouse.KeyDown:connect(function(NEWKEY) | |
2438 | KeyDown(NEWKEY) | |
2439 | end) | |
2440 | Mouse.KeyUp:connect(function(NEWKEY) | |
2441 | KeyUp(NEWKEY) | |
2442 | end) | |
2443 | ||
2444 | elseif Use_HopperBin == true then | |
2445 | WEAPONTOOL.Parent = Backpack | |
2446 | script.Parent = WEAPONTOOL | |
2447 | function SelectTool(Mouse) | |
2448 | Mouse.Button1Down:connect(function() | |
2449 | MouseDown(Mouse) | |
2450 | end) | |
2451 | Mouse.Button1Up:connect(function() | |
2452 | MouseUp(Mouse) | |
2453 | end) | |
2454 | Mouse.KeyDown:connect(KeyDown) | |
2455 | Mouse.KeyUp:connect(KeyUp) | |
2456 | end | |
2457 | function DeselectTool(Mouse) | |
2458 | end | |
2459 | WEAPONTOOL.Selected:connect(SelectTool) | |
2460 | WEAPONTOOL.Deselected:connect(DeselectTool) | |
2461 | end | |
2462 | ||
2463 | --//=================================\\ | |
2464 | --\\=================================// | |
2465 | ||
2466 | ||
2467 | ||
2468 | ||
2469 | ||
2470 | --//=================================\\ | |
2471 | --|| WRAP THE WHOLE SCRIPT UP | |
2472 | --\\=================================// | |
2473 | ||
2474 | while true do | |
2475 | Swait() | |
2476 | if HitboxPart ~= nil and ATTACK == false and StaggerHit.Value == false and Stagger.Value == false and Stun.Value == false then | |
2477 | HitboxPart.Name = "NilHitbox" | |
2478 | else | |
2479 | HitboxPart.Name = "Hitbox" | |
2480 | end | |
2481 | if Enable_Gui == true then | |
2482 | UpdateGUI() | |
2483 | end | |
2484 | UpdateSkillsAndStuff() | |
2485 | if Walkspeed_Depends_On_Movement_Value == true then | |
2486 | if Movement.Value < 0 or StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true or Rooted.Value == true then | |
2487 | Humanoid.WalkSpeed = 0 | |
2488 | else | |
2489 | Humanoid.WalkSpeed = 16 * Movement.Value * Player_Size | |
2490 | end | |
2491 | end | |
2492 | if Enable_Stun == true and StunValue.Value >= Max_Stun then | |
2493 | StunValue.Value = 0 | |
2494 | Stun.Value = true | |
2495 | end | |
2496 | if Enable_Stagger_Hit == true then | |
2497 | if StaggerHit.Value == true and STAGGERHITANIM == false then | |
2498 | coroutine.resume(coroutine.create(function() | |
2499 | STAGGERHITANIM = true | |
2500 | while ATTACK == true do | |
2501 | Swait() | |
2502 | end | |
2503 | StaggerHitAnimation() | |
2504 | StaggerHit.Value = false | |
2505 | STAGGERHITANIM = false | |
2506 | end)) | |
2507 | end | |
2508 | else | |
2509 | StaggerHit.Value = false | |
2510 | end | |
2511 | if Enable_Stagger == true then | |
2512 | if Stagger.Value == true and STAGGERANIM == false then | |
2513 | coroutine.resume(coroutine.create(function() | |
2514 | STAGGERANIM = true | |
2515 | while ATTACK == true do | |
2516 | Swait() | |
2517 | end | |
2518 | StaggerAnimation() | |
2519 | Stagger.Value = false | |
2520 | STAGGERANIM = false | |
2521 | end)) | |
2522 | end | |
2523 | else | |
2524 | Stagger.Value = false | |
2525 | end | |
2526 | if Enable_Stun == true then | |
2527 | if Stun.Value == true and STUNANIM == false then | |
2528 | coroutine.resume(coroutine.create(function() | |
2529 | StunValue.Value = 0 | |
2530 | STUNANIM = true | |
2531 | while ATTACK == true do | |
2532 | Swait() | |
2533 | end | |
2534 | StunAnimation() | |
2535 | Stun.Value = false | |
2536 | STUNANIM = false | |
2537 | end)) | |
2538 | end | |
2539 | else | |
2540 | StunValue.Value = 0 | |
2541 | Stun.Value = false | |
2542 | end | |
2543 | if DONUMBER >= .5 then | |
2544 | HANDIDLE = true | |
2545 | elseif DONUMBER <= 0 then | |
2546 | HANDIDLE = false | |
2547 | end | |
2548 | if HANDIDLE == false then | |
2549 | DONUMBER = DONUMBER + 0.003 / Animation_Speed | |
2550 | else | |
2551 | DONUMBER = DONUMBER - 0.003 / Animation_Speed | |
2552 | end | |
2553 | if ATTACK == false then | |
2554 | IDLENUMBER = IDLENUMBER + 1 | |
2555 | else | |
2556 | IDLENUMBER = 0 | |
2557 | end | |
2558 | if Enable_Stats == true then | |
2559 | for _, v in pairs (ChangeStat:GetChildren()) do | |
2560 | if v:FindFirstChild("Duration") ~= nil then | |
2561 | v:FindFirstChild("Duration").Value = v:FindFirstChild("Duration").Value - (1 / 30) / Animation_Speed | |
2562 | if v:FindFirstChild("Duration").Value <= 0 then | |
2563 | v.Parent = nil | |
2564 | end | |
2565 | end | |
2566 | if v.Name == "ChangeDefense" then | |
2567 | CHANGEDEFENSE = CHANGEDEFENSE + v.Value | |
2568 | elseif v.Name == "ChangeDamage" then | |
2569 | CHANGEDAMAGE = CHANGEDAMAGE + v.Value | |
2570 | elseif v.Name == "ChangeMovement" then | |
2571 | CHANGEMOVEMENT = CHANGEMOVEMENT + v.Value | |
2572 | end | |
2573 | end | |
2574 | Defense.Value = 1 + (CHANGEDEFENSE) | |
2575 | if Defense.Value <= 0.01 then | |
2576 | Defense.Value = 0.01 | |
2577 | end | |
2578 | Damage.Value = 1 + (CHANGEDAMAGE) | |
2579 | if Damage.Value <= 0 then | |
2580 | Damage.Value = 0 | |
2581 | end | |
2582 | Movement.Value = 1 + (CHANGEMOVEMENT) | |
2583 | if Movement.Value <= 0 then | |
2584 | Movement.Value = 0 | |
2585 | end | |
2586 | CHANGEDEFENSE = 0 | |
2587 | CHANGEDAMAGE = 0 | |
2588 | CHANGEMOVEMENT = 0 | |
2589 | end | |
2590 | SINE = SINE + CHANGE | |
2591 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
2592 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
2593 | local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position) | |
2594 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character) | |
2595 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
2596 | if ANIM == "Walk" and EQUIPPED == true and TORSOVELOCITY > 1 then | |
2597 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.1 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2598 | Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * 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) | |
2599 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2600 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2601 | elseif (ANIM ~= "Walk" and EQUIPPED == true) or (TORSOVELOCITY < 1) then | |
2602 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
2603 | Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
2604 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
2605 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
2606 | end | |
2607 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
2608 | ANIM = "Jump" | |
2609 | if EQUIPPED == true and ATTACK == false then | |
2610 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
2611 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
2612 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
2613 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
2614 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
2615 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
2616 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(90), RAD(0)), 0.2 / Animation_Speed) | |
2617 | end | |
2618 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
2619 | ANIM = "Fall" | |
2620 | if EQUIPPED == true and ATTACK == false then | |
2621 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
2622 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
2623 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
2624 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
2625 | 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(20)), 0.2 / Animation_Speed) | |
2626 | 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(10)), 0.2 / Animation_Speed) | |
2627 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(90), RAD(0)), 0.2 / Animation_Speed) | |
2628 | end | |
2629 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
2630 | ANIM = "Idle" | |
2631 | if EQUIPPED == true and ATTACK == false then | |
2632 | 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(10), RAD(0), RAD(-20)), 0.15 / Animation_Speed) | |
2633 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(5 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(15)), 0.15 / Animation_Speed) | |
2634 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(20 + 2.5 * SIN(SINE / 12)), RAD(0), RAD(20 - 2.5 * COS(SINE / 12) + 2.5 * SIN(SINE / 24))) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
2635 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(10 - 2.5 * COS(SINE / 16)), RAD(0), RAD(-25 + 2.5 * SIN(SINE / 24))) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
2636 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-2.5)), 0.15 / Animation_Speed) | |
2637 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.05 * COS(SINE / 12) * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(-65), RAD(0)) * ANGLES(RAD(-7.5), RAD(0), RAD(-15)), 0.15 / Animation_Speed) | |
2638 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-100), RAD(90), RAD(0)), 0.15 / Animation_Speed) | |
2639 | end | |
2640 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
2641 | ANIM = "Walk" | |
2642 | WALK = WALK + 1 / Animation_Speed | |
2643 | if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then | |
2644 | WALK = 0 | |
2645 | if WALKINGANIM == true then | |
2646 | WALKINGANIM = false | |
2647 | elseif WALKINGANIM == false then | |
2648 | WALKINGANIM = true | |
2649 | end | |
2650 | end | |
2651 | if EQUIPPED == true and ATTACK == false then | |
2652 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0.05 * COS(SINE / WALKSPEEDVALUE) * Player_Size, 0 * Player_Size, -0.1 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(-40)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2653 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(40)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2654 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-10 + 2.5 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(45 + 2.5 * SIN(SINE / (WALKSPEEDVALUE / 2)))) * RIGHTSHOULDERC0, 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2655 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.5 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(50)) * ANGLES(RAD(-2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2656 | RightHip.C0 = Clerp(RightHip.C0, CF(0.95 * Player_Size, -1 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(130), RAD(0)) * ANGLES(RAD(-1.25 - 2.5 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2657 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.9 * Player_Size, 0.25 * Player_Size) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-2.5 + 2.5 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2658 | HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(90), RAD(0)), 0.15 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
2659 | end | |
2660 | end | |
2661 | ||
2662 | end | |
2663 | ||
2664 | --//=================================\\ | |
2665 | --\\=================================// | |
2666 | ||
2667 | ||
2668 | ||
2669 | ||
2670 | ||
2671 | --//====================================================\\-- | |
2672 | --|| END OF SCRIPT | |
2673 | --\\====================================================//-- |