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