SHOW:
|
|
- or go back to the newest paste.
1 | --//====================================================\\-- | |
2 | --|| CREATED BY PSYCHO SHACKLUSTER | |
3 | --\\====================================================//-- | |
4 | ||
5 | ||
6 | ||
7 | wait(0.3) | |
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 | hasdied = false | |
32 | demon = false | |
33 | ||
34 | IT = Instance.new | |
35 | CF = CFrame.new | |
36 | VT = Vector3.new | |
37 | RAD = math.rad | |
38 | C3 = Color3.new | |
39 | UD2 = UDim2.new | |
40 | BRICKC = BrickColor.new | |
41 | ANGLES = CFrame.Angles | |
42 | EULER = CFrame.fromEulerAnglesXYZ | |
43 | COS = math.cos | |
44 | ACOS = math.acos | |
45 | SIN = math.sin | |
46 | ASIN = math.asin | |
47 | ABS = math.abs | |
48 | MRANDOM = math.random | |
49 | FLOOR = math.floor | |
50 | ||
51 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
52 | local NEWMESH = IT(MESH) | |
53 | if MESH == "SpecialMesh" then | |
54 | NEWMESH.MeshType = MESHTYPE | |
55 | if MESHID ~= "nil" and MESHID ~= "" then | |
56 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
57 | end | |
58 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
59 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
60 | end | |
61 | end | |
62 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
63 | NEWMESH.Scale = SCALE | |
64 | NEWMESH.Parent = PARENT | |
65 | return NEWMESH | |
66 | end | |
67 | ||
68 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE) | |
69 | local NEWPART = IT("Part") | |
70 | NEWPART.formFactor = FORMFACTOR | |
71 | NEWPART.Reflectance = REFLECTANCE | |
72 | NEWPART.Transparency = TRANSPARENCY | |
73 | NEWPART.CanCollide = false | |
74 | NEWPART.Locked = true | |
75 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
76 | NEWPART.Name = NAME | |
77 | NEWPART.Size = SIZE | |
78 | NEWPART.Position = Torso.Position | |
79 | NEWPART.Material = MATERIAL | |
80 | NEWPART:BreakJoints() | |
81 | NEWPART.Parent = PARENT | |
82 | return NEWPART | |
83 | end | |
84 | ||
85 | ||
86 | --//=================================\\ | |
87 | --|| CUSTOMIZATION | |
88 | --\\=================================// | |
89 | ||
90 | Class_Name = "Chainiac" | |
91 | Weapon_Name = "Chainiac" | |
92 | ||
93 | Custom_Colors = { | |
94 | Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon. | |
95 | Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon. | |
96 | ||
97 | Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities. | |
98 | Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar. | |
99 | Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar. | |
100 | Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar. | |
101 | Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar. | |
102 | ||
103 | Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar. | |
104 | Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar. | |
105 | Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar. | |
106 | Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar. | |
107 | Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities. | |
108 | } | |
109 | ||
110 | Mana_Bar_Background_Transparency = 0 --Transparency for the background of the mana bar. | |
111 | Secondary_Mana_Bar_Background_Transparency = 0 --Transparency for the background of the secondary mana bar. | |
112 | Health_Bar_Background_Transparency = 0 --Transparency for the background of the health bar. | |
113 | Stun_Bar_Background_Transparency = 0 --Transparency for the background of the stun bar. | |
114 | Ability_Background_Transparency = 0 --Transparency for the background of the abilities. | |
115 | Stat_Background_Transparency = 0 --Transparency for the background of the stats. | |
116 | ||
117 | Player_Size = 1 --Size of the player. | |
118 | Animation_Speed = 5.2 | |
119 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
120 | ||
121 | Enable_Gui = false --Enables or disables the Weapon Gui. Also functions as hiding or showing the Gui. | |
122 | Enable_Stats = false --Enables or disables stats. | |
123 | Put_Stats_In_Character = false --Places stats in Character. | |
124 | Enable_Stagger_Hit = false --Enables or disables staggering when hitting a hitbox of some sort. | |
125 | Play_Hitbox_Hit_Sound = true --Plays a hit sound when hitting a hitbox of some sort. | |
126 | Enable_Stagger = false --Enables or disables staggering. | |
127 | Enable_Stun = false --Enables or disables the stun mechanic. | |
128 | Enable_Abilities = false --Enables abilites with cooldowns and mana costs. | |
129 | Enable_Secondary_Bar = false --Enables the secondary mana bar, if true. | |
130 | ||
131 | Start_Equipped = false --Starts the player equipped with their weapon. | |
132 | Start_Equipped_With_Equipped_Animation = false --Used in conjunction with the above option. Starts your equip animation. | |
133 | Can_Equip_Or_Unequip = false --Enables or disables the ability to unequip or equip your weapon. | |
134 | Disable_Animator = false --Disables the Animator in the humanoid. | |
135 | Disable_Animate = true --Disables the Animate script in the character. | |
136 | Disable_Moving_Arms = false --Keeps the arms from moving around. | |
137 | Use_Motors_Instead_Of_Welds = false --Uses motors instead of welds to disable moving arms. | |
138 | Walkspeed_Depends_On_Movement_Value = false --Walkspeed depends on movement value. Self-explanatory. | |
139 | Disable_Jump = false --Disables jumping. | |
140 | Use_HopperBin = false --Uses a hopperbin to do things. | |
141 | ||
142 | Cooldown_1 = 0 --Cooldowns for abilites. | |
143 | Cooldown_2 = 0 | |
144 | Cooldown_3 = 0 | |
145 | Cooldown_4 = 0 | |
146 | Skill_1_Mana_Cost = 0 --How much mana is required to use the skill. | |
147 | Skill_2_Mana_Cost = 0 | |
148 | Skill_3_Mana_Cost = 0 | |
149 | Skill_4_Mana_Cost = 0 | |
150 | Max_Mana = 0 --Maximum amount of mana you can have. | |
151 | Max_Secondary_Mana = 0 --Maximum amount of secondary mana you can have. | |
152 | Mana_Name = "Mana" --Name for the mana bar. | |
153 | Secondary_Mana_Name = "Block" --Name for the secondary mana bar. | |
154 | Max_Stun = 1 --Maximum amount of stun you can have. | |
155 | Recover_Mana = 0 --How much mana you gain. | |
156 | Mana_Regen_Mode = "1" --Basically switches from one mana regen system to another. | |
157 | Secondary_Mana_Regen_Mode = "1" --Basically switches from one secondary mana regen system to another. | |
158 | Stun_Lose_Mode = "1" --Basically switches from one secondary stun loss system to another. | |
159 | Recover_Secondary_Mana = 0 --How much secondary mana you gain. | |
160 | Lose_Stun = 0 --How much stun you lose. | |
161 | Stun_Wait = 0 --Delay between losing stun. | |
162 | Mana_Wait = 0 --Delay between gaining mana. | |
163 | Secondary_Mana_Wait = 0 --Delay between gaining secondary mana. | |
164 | Menu_Update_Speed = 0 --How fast the Weapon Gui will update. | |
165 | Constant_Update = false --Removes the delay between updating the Weapon GUI. | |
166 | Show_Stats = false --Hides or shows stats. | |
167 | Stat_Offset = 0.74 --For cosmetic purposes. {0.74, 0.78} | |
168 | ||
169 | --//=================================\\ | |
170 | --|| END OF CUSTOMIZATION | |
171 | --\\=================================// | |
172 | ||
173 | local function weldBetween(a, b) | |
174 | local weldd = Instance.new("ManualWeld") | |
175 | weldd.Part0 = a | |
176 | weldd.Part1 = b | |
177 | weldd.C0 = CFrame.new() | |
178 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
179 | weldd.Parent = a | |
180 | return weldd | |
181 | end | |
182 | ||
183 | function createaccessory(attachmentpart,mesh,texture,scale,offset,color) | |
184 | local acs = Instance.new("Part") | |
185 | acs.CanCollide = false | |
186 | acs.Anchored = false | |
187 | acs.Size = Vector3.new(0,0,0) | |
188 | acs.CFrame = attachmentpart.CFrame | |
189 | acs.Parent = Character | |
190 | acs.BrickColor = color | |
191 | local meshs = Instance.new("SpecialMesh") | |
192 | meshs.MeshId = mesh | |
193 | meshs.TextureId = texture | |
194 | meshs.Parent = acs | |
195 | meshs.Scale = scale | |
196 | meshs.Offset = offset | |
197 | weldBetween(attachmentpart,acs) | |
198 | end | |
199 | ||
200 | local accessories = Instance.new("Folder",Character) | |
201 | accessories.Name = "Add-ons" | |
202 | ||
203 | function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE) | |
204 | if TYPE == "Gem" then | |
205 | local acs = CreatePart(3, accessories, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0)) | |
206 | acs.Anchored = false | |
207 | acs.CanCollide = false | |
208 | acs.CFrame = PART.CFrame | |
209 | local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET) | |
210 | weldBetween(PART,acs) | |
211 | elseif TYPE == "Skull" then | |
212 | local acs = CreatePart(3, accessories, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0)) | |
213 | acs.Anchored = false | |
214 | acs.CanCollide = false | |
215 | acs.CFrame = PART.CFrame | |
216 | local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET) | |
217 | weldBetween(PART,acs) | |
218 | elseif TYPE == "Eye" then | |
219 | local acs = CreatePart(3, accessories, "Neon", 0, 0, COLOR, "Part", VT(0,0,0)) | |
220 | acs.Anchored = false | |
221 | acs.CanCollide = false | |
222 | acs.CFrame = PART.CFrame | |
223 | local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET) | |
224 | weldBetween(PART,acs) | |
225 | end | |
226 | end | |
227 | ||
228 | --//=================================\\ | |
229 | --|| USEFUL VALUES | |
230 | --\\=================================// | |
231 | ||
232 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
233 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
234 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
235 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
236 | local CO1 = 0 | |
237 | local CO2 = 0 | |
238 | local CO3 = 0 | |
239 | local CO4 = 0 | |
240 | local KEYHOLD = false | |
241 | local CHANGEDEFENSE = 0 | |
242 | local CHANGEDAMAGE = 0 | |
243 | local CHANGEMOVEMENT = 0 | |
244 | local ANIM = "Idle" | |
245 | local ATTACK = false | |
246 | local EQUIPPED = false | |
247 | local HOLD = false | |
248 | local COMBO = 1 | |
249 | local LASTPOINT = nil | |
250 | local BLCF = nil | |
251 | local SCFR = nil | |
252 | local STAGGERHITANIM = false | |
253 | local STAGGERANIM = false | |
254 | local STUNANIM = false | |
255 | local CRITCHANCENUMBER = 0 | |
256 | local IDLENUMBER = 0 | |
257 | local DONUMBER = 0 | |
258 | local HANDIDLE = false | |
259 | local SINE = 0 | |
260 | local CHANGE = 2 / Animation_Speed | |
261 | local WALKINGANIM = false | |
262 | local WALK = 0 | |
263 | local DISABLEJUMPING = false | |
264 | local HASBEENBLOCKED = false | |
265 | local INTRODONE = false | |
266 | local STUNDELAYNUMBER = 0 | |
267 | local MANADELAYNUMBER = 0 | |
268 | local SECONDARYMANADELAYNUMBER = 0 | |
269 | local ROBLOXIDLEANIMATION = IT("Animation") | |
270 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
271 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
272 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
273 | local WEAPONGUI = IT("ScreenGui", nil) | |
274 | WEAPONGUI.Name = "Weapon GUI" | |
275 | local WEAPONTOOL = IT("HopperBin", nil) | |
276 | WEAPONTOOL.Name = Weapon_Name | |
277 | local Weapon = IT("Model") | |
278 | Weapon.Name = Weapon_Name | |
279 | local Effects = IT("Folder", Weapon) | |
280 | Effects.Name = "Effects" | |
281 | local ANIMATOR = Humanoid.Animator | |
282 | local ANIMATE = Character.Animate | |
283 | local HITPLAYERSOUNDS = {"703633905","264486467","356551938"} | |
284 | local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"} | |
285 | local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"} | |
286 | local HITBLOCKSOUNDS = {"199148933", "199148947"} | |
287 | local CHAINSAWIDLE = Instance.new("Sound",Torso) | |
288 | CHAINSAWIDLE.SoundId = "rbxassetid://1165167610" | |
289 | CHAINSAWIDLE.Volume = 3 | |
290 | CHAINSAWIDLE.Looped = true | |
291 | local REV = Instance.new("Sound",Torso) | |
292 | REV.SoundId = "rbxassetid://1165167936" | |
293 | REV.Looped = true | |
294 | REV.Volume = 1.6 | |
295 | local CHAINSAWSTRIKE = Instance.new("Sound",Torso) | |
296 | CHAINSAWSTRIKE.Playing = false | |
297 | CHAINSAWSTRIKE.SoundId = "rbxassetid://862701802" | |
298 | local Taunt1 = Instance.new("Sound",Torso) | |
299 | Taunt1.Volume = 3 | |
300 | Taunt1.SoundId = "rbxassetid://834001699" | |
301 | local Taunt2 = Instance.new("Sound",Torso) | |
302 | Taunt2.Volume = 3 | |
303 | Taunt2.SoundId = "rbxassetid://834001752" | |
304 | local Taunt3 = Instance.new("Sound",Torso) | |
305 | Taunt3.Volume = 3 | |
306 | Taunt3.SoundId = "rbxassetid://834001797" | |
307 | local Taunt4 = Instance.new("Sound",Torso) | |
308 | Taunt4.Volume = 3 | |
309 | Taunt4.SoundId = "rbxassetid://834001828" | |
310 | local TAUNTS = {Taunt1,Taunt2,Taunt3,Taunt4} | |
311 | local FRESHMEAT = Instance.new("Sound",Torso) | |
312 | FRESHMEAT.Playing = false | |
313 | FRESHMEAT.Volume = 5 | |
314 | FRESHMEAT.SoundId = "rbxassetid://2767085" | |
315 | local sick = Instance.new("Sound",Character) | |
316 | sick.SoundId = "rbxassetid://1120185600" | |
317 | sick.Looped = true | |
318 | sick.Pitch = 0.6 | |
319 | sick.Volume = 1 | |
320 | --//=================================\\ | |
321 | --\\=================================// | |
322 | ||
323 | --//=================================\\ | |
324 | --|| STATS | |
325 | --\\=================================// | |
326 | ||
327 | if Character:FindFirstChild("Stats") ~= nil then | |
328 | Character:FindFirstChild("Stats").Parent = nil | |
329 | end | |
330 | ||
331 | local Stats = IT("Folder", nil) | |
332 | Stats.Name = "Stats" | |
333 | local ChangeStat = IT("Folder", Stats) | |
334 | ChangeStat.Name = "ChangeStat" | |
335 | local Defense = IT("NumberValue", Stats) | |
336 | Defense.Name = "Defense" | |
337 | Defense.Value = 1 | |
338 | local Movement = IT("NumberValue", Stats) | |
339 | Movement.Name = "Movement" | |
340 | Movement.Value = 1 | |
341 | local Damage = IT("NumberValue", Stats) | |
342 | Damage.Name = "Damage" | |
343 | Damage.Value = 1 | |
344 | local Mana = IT("NumberValue", Stats) | |
345 | Mana.Name = "Mana" | |
346 | Mana.Value = 0 | |
347 | local SecondaryMana = IT("NumberValue", Stats) | |
348 | SecondaryMana.Name = "SecondaryMana" | |
349 | SecondaryMana.Value = 0 | |
350 | local CanCrit = IT("BoolValue", Stats) | |
351 | CanCrit.Name = "CanCrit" | |
352 | CanCrit.Value = false | |
353 | local CritChance = IT("NumberValue", Stats) | |
354 | CritChance.Name = "CritChance" | |
355 | CritChance.Value = 20 | |
356 | local CanPenetrateArmor = IT("BoolValue", Stats) | |
357 | CanPenetrateArmor.Name = "CanPenetrateArmor" | |
358 | CanPenetrateArmor.Value = false | |
359 | local AntiTeamKill = IT("BoolValue", Stats) | |
360 | AntiTeamKill.Name = "AntiTeamKill" | |
361 | AntiTeamKill.Value = false | |
362 | local Rooted = IT("BoolValue", Stats) | |
363 | Rooted.Name = "Rooted" | |
364 | Rooted.Value = false | |
365 | local Block = IT("BoolValue", Stats) | |
366 | Block.Name = "Block" | |
367 | Block.Value = false | |
368 | local RecentEnemy = IT("ObjectValue", Stats) | |
369 | RecentEnemy.Name = "RecentEnemy" | |
370 | RecentEnemy.Value = nil | |
371 | local StaggerHit = IT("BoolValue", Stats) | |
372 | StaggerHit.Name = "StaggerHit" | |
373 | StaggerHit.Value = false | |
374 | local Stagger = IT("BoolValue", Stats) | |
375 | Stagger.Name = "Stagger" | |
376 | Stagger.Value = false | |
377 | local Stun = IT("BoolValue", Stats) | |
378 | Stun.Name = "Stun" | |
379 | Stun.Value = false | |
380 | local StunValue = IT("NumberValue", Stats) | |
381 | StunValue.Name = "StunValue" | |
382 | StunValue.Value = 0 | |
383 | ||
384 | if Enable_Stats == true and Put_Stats_In_Character == true then | |
385 | Stats.Parent = Character | |
386 | end | |
387 | ||
388 | --//=================================\\ | |
389 | --\\=================================// | |
390 | ||
391 | ||
392 | ||
393 | ||
394 | ||
395 | --//=================================\\ | |
396 | --|| DEBUFFS / BUFFS | |
397 | --\\=================================// | |
398 | ||
399 | local DEFENSECHANGE1 = IT("NumberValue", ChangeStat) | |
400 | DEFENSECHANGE1.Name = "ChangeDefense" | |
401 | DEFENSECHANGE1.Value = 0 | |
402 | ||
403 | local MOVEMENTCHANGE1 = IT("NumberValue", nil) | |
404 | MOVEMENTCHANGE1.Name = "ChangeMovement" | |
405 | MOVEMENTCHANGE1.Value = 0 | |
406 | ||
407 | --//=================================\\ | |
408 | --\\=================================// | |
409 | ||
410 | ||
411 | ||
412 | ||
413 | ||
414 | --//=================================\\ | |
415 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
416 | --\\=================================// | |
417 | ||
418 | ArtificialHB = Instance.new("BindableEvent", script) | |
419 | ArtificialHB.Name = "ArtificialHB" | |
420 | ||
421 | script:WaitForChild("ArtificialHB") | |
422 | ||
423 | frame = Frame_Speed | |
424 | tf = 0 | |
425 | allowframeloss = false | |
426 | tossremainder = false | |
427 | lastframe = tick() | |
428 | script.ArtificialHB:Fire() | |
429 | ||
430 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
431 | tf = tf + s | |
432 | if tf >= frame then | |
433 | if allowframeloss then | |
434 | script.ArtificialHB:Fire() | |
435 | lastframe = tick() | |
436 | else | |
437 | for i = 1, math.floor(tf / frame) do | |
438 | script.ArtificialHB:Fire() | |
439 | end | |
440 | lastframe = tick() | |
441 | end | |
442 | if tossremainder then | |
443 | tf = 0 | |
444 | else | |
445 | tf = tf - frame * math.floor(tf / frame) | |
446 | end | |
447 | end | |
448 | end) | |
449 | ||
450 | --//=================================\\ | |
451 | --\\=================================// | |
452 | ||
453 | ||
454 | ||
455 | ||
456 | ||
457 | --//=================================\\ | |
458 | --|| SOME FUNCTIONS | |
459 | --\\=================================// | |
460 | ||
461 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
462 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
463 | end | |
464 | ||
465 | function PositiveAngle(NUMBER) | |
466 | if NUMBER >= 0 then | |
467 | NUMBER = 0 | |
468 | end | |
469 | return NUMBER | |
470 | end | |
471 | ||
472 | function NegativeAngle(NUMBER) | |
473 | if NUMBER <= 0 then | |
474 | NUMBER = 0 | |
475 | end | |
476 | return NUMBER | |
477 | end | |
478 | ||
479 | function Swait(NUMBER) | |
480 | if NUMBER == 0 or NUMBER == nil then | |
481 | ArtificialHB.Event:wait() | |
482 | else | |
483 | for i = 1, NUMBER do | |
484 | ArtificialHB.Event:wait() | |
485 | end | |
486 | end | |
487 | end | |
488 | ||
489 | function QuaternionFromCFrame(cf) | |
490 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
491 | local trace = m00 + m11 + m22 | |
492 | if trace > 0 then | |
493 | local s = math.sqrt(1 + trace) | |
494 | local recip = 0.5 / s | |
495 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
496 | else | |
497 | local i = 0 | |
498 | if m11 > m00 then | |
499 | i = 1 | |
500 | end | |
501 | if m22 > (i == 0 and m00 or m11) then | |
502 | i = 2 | |
503 | end | |
504 | if i == 0 then | |
505 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
506 | local recip = 0.5 / s | |
507 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
508 | elseif i == 1 then | |
509 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
510 | local recip = 0.5 / s | |
511 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
512 | elseif i == 2 then | |
513 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
514 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
515 | end | |
516 | end | |
517 | end | |
518 | ||
519 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
520 | local xs, ys, zs = x + x, y + y, z + z | |
521 | local wx, wy, wz = w * xs, w * ys, w * zs | |
522 | local xx = x * xs | |
523 | local xy = x * ys | |
524 | local xz = x * zs | |
525 | local yy = y * ys | |
526 | local yz = y * zs | |
527 | local zz = z * zs | |
528 | 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)) | |
529 | end | |
530 | ||
531 | function QuaternionSlerp(a, b, t) | |
532 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
533 | local startInterp, finishInterp; | |
534 | if cosTheta >= 0.0001 then | |
535 | if (1 - cosTheta) > 0.0001 then | |
536 | local theta = ACOS(cosTheta) | |
537 | local invSinTheta = 1 / SIN(theta) | |
538 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
539 | finishInterp = SIN(t * theta) * invSinTheta | |
540 | else | |
541 | startInterp = 1 - t | |
542 | finishInterp = t | |
543 | end | |
544 | else | |
545 | if (1 + cosTheta) > 0.0001 then | |
546 | local theta = ACOS(-cosTheta) | |
547 | local invSinTheta = 1 / SIN(theta) | |
548 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
549 | finishInterp = SIN(t * theta) * invSinTheta | |
550 | else | |
551 | startInterp = t - 1 | |
552 | finishInterp = t | |
553 | end | |
554 | end | |
555 | 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 | |
556 | end | |
557 | ||
558 | function Clerp(a, b, t) | |
559 | local qa = {QuaternionFromCFrame(a)} | |
560 | local qb = {QuaternionFromCFrame(b)} | |
561 | local ax, ay, az = a.x, a.y, a.z | |
562 | local bx, by, bz = b.x, b.y, b.z | |
563 | local _t = 1 - t | |
564 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
565 | end | |
566 | ||
567 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
568 | local frame = IT("Frame") | |
569 | frame.BackgroundTransparency = TRANSPARENCY | |
570 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
571 | frame.Position = POSITION | |
572 | frame.Size = SIZE | |
573 | frame.BackgroundColor3 = COLOR | |
574 | frame.BorderColor3 = BORDERCOLOR | |
575 | frame.Name = NAME | |
576 | frame.Parent = PARENT | |
577 | return frame | |
578 | end | |
579 | ||
580 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
581 | local label = IT("TextLabel") | |
582 | label.BackgroundTransparency = 1 | |
583 | label.Size = UD2(1, 0, 1, 0) | |
584 | label.Position = UD2(0, 0, 0, 0) | |
585 | label.TextColor3 = C3(255, 255, 255) | |
586 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
587 | label.TextTransparency = TRANSPARENCY | |
588 | label.FontSize = TEXTFONTSIZE | |
589 | label.Font = TEXTFONT | |
590 | label.BorderSizePixel = BORDERSIZEPIXEL | |
591 | label.TextScaled = true | |
592 | label.Text = TEXT | |
593 | label.Name = NAME | |
594 | label.Parent = PARENT | |
595 | return label | |
596 | end | |
597 | ||
598 | function NoOutlines(PART) | |
599 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
600 | end | |
601 | ||
602 | ||
603 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
604 | local NEWWELD = IT(TYPE) | |
605 | NEWWELD.Part0 = PART0 | |
606 | NEWWELD.Part1 = PART1 | |
607 | NEWWELD.C0 = C0 | |
608 | NEWWELD.C1 = C1 | |
609 | NEWWELD.Parent = PARENT | |
610 | return NEWWELD | |
611 | end | |
612 | ||
613 | function CreateSound(ID, PARENT, VOLUME, PITCH) | |
614 | coroutine.resume(coroutine.create(function() | |
615 | local NEWSOUND = IT("Sound", PARENT) | |
616 | NEWSOUND.Volume = VOLUME | |
617 | NEWSOUND.Pitch = PITCH | |
618 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
619 | Swait() | |
620 | NEWSOUND:play() | |
621 | game:GetService("Debris"):AddItem(NEWSOUND, 10) | |
622 | end)) | |
623 | end | |
624 | ||
625 | function CFrameFromTopBack(at, top, back) | |
626 | local right = top:Cross(back) | |
627 | 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) | |
628 | end | |
629 | ||
630 | function Lightning(POSITION1, POSITION2, MULTIPLIERTIME, LIGHTNINGDELAY, OFFSET, BRICKCOLOR, MATERIAL, SIZE, TRANSPARENCY, LASTINGTIME) | |
631 | local MAGNITUDE = (POSITION1 - POSITION2).magnitude | |
632 | local CURRENTPOSITION = POSITION1 | |
633 | local LIGHTNINGOFFSET = {-OFFSET, OFFSET} | |
634 | coroutine.resume(coroutine.create(function() | |
635 | for i = 1, MULTIPLIERTIME do | |
636 | local LIGHTNINGPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR,"Effect", VT(SIZE * Player_Size, SIZE * Player_Size, MAGNITUDE / MULTIPLIERTIME)) | |
637 | LIGHTNINGPART.Anchored = true | |
638 | local LIGHTNINGOFFSET2 = VT(LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)]) | |
639 | local LIGHTNINGPOSITION1 = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME).p + LIGHTNINGOFFSET2 | |
640 | if MULTIPLIERTIME == i then | |
641 | local LIGHTNINGMAGNITUDE1 = (CURRENTPOSITION - POSITION2).magnitude | |
642 | LIGHTNINGPART.Size = VT(SIZE * Player_Size, SIZE * Player_Size, LIGHTNINGMAGNITUDE1) | |
643 | LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, -LIGHTNINGMAGNITUDE1 / 2) | |
644 | else | |
645 | LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, LIGHTNINGPOSITION1) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2) | |
646 | end | |
647 | CURRENTPOSITION=LIGHTNINGPART.CFrame * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2).p | |
648 | game.Debris:AddItem(LIGHTNINGPART, LASTINGTIME) | |
649 | coroutine.resume(coroutine.create(function() | |
650 | while LIGHTNINGPART.Transparency ~= 1 do | |
651 | --local StartTransparency = tra | |
652 | for i=0, 1, LASTINGTIME do | |
653 | Swait() | |
654 | LIGHTNINGPART.Transparency = LIGHTNINGPART.Transparency + (0.1 / LASTINGTIME) | |
655 | end | |
656 | end | |
657 | end)) | |
658 | Swait(LIGHTNINGDELAY / Animation_Speed) | |
659 | end | |
660 | end)) | |
661 | end | |
662 | ||
663 | --[[Usage: | |
664 | local Pos = Part | |
665 | local Offset = Part.CFrame * CF(0, 0, 0) | |
666 | local Color = "Institutional white" | |
667 | local Material = "Neon" | |
668 | local TheDelay = 0.01 | |
669 | local Height = 4 | |
670 | BLCF = Offset | |
671 | if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then | |
672 | 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) | |
673 | if a then game:GetService("Debris"):AddItem(a, 1) end | |
674 | if b then game:GetService("Debris"):AddItem(b, 1) end | |
675 | 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) | |
676 | if a then game:GetService("Debris"):AddItem(a, 1) end | |
677 | if b then game:GetService("Debris"):AddItem(b, 1) end | |
678 | SCFR = BLCF | |
679 | elseif not SCFR then | |
680 | SCFR = BLCF | |
681 | end | |
682 | -- | |
683 | BLCF = nil | |
684 | SCFR = nil | |
685 | --]] | |
686 | ||
687 | --//=================================\\ | |
688 | --\\=================================// | |
689 | ||
690 | ||
691 | ||
692 | ||
693 | ||
694 | --//=================================\\ | |
695 | --|| RESIZE PLAYER | |
696 | --\\=================================// | |
697 | ||
698 | if Player_Size ~= 1 then | |
699 | RootPart.Size = RootPart.Size * Player_Size | |
700 | Torso.Size = Torso.Size * Player_Size | |
701 | Head.Size = Head.Size * Player_Size | |
702 | RightArm.Size = RightArm.Size * Player_Size | |
703 | LeftArm.Size = LeftArm.Size * Player_Size | |
704 | RightLeg.Size = RightLeg.Size * Player_Size | |
705 | LeftLeg.Size = LeftLeg.Size * Player_Size | |
706 | RootJoint.Parent = RootPart | |
707 | Neck.Parent = Torso | |
708 | RightShoulder.Parent = Torso | |
709 | LeftShoulder.Parent = Torso | |
710 | RightHip.Parent = Torso | |
711 | LeftHip.Parent = Torso | |
712 | ||
713 | RootJoint.C0 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
714 | RootJoint.C1 = ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
715 | Neck.C0 = NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)) | |
716 | Neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
717 | RightShoulder.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0 | |
718 | LeftShoulder.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0 | |
719 | if Disable_Moving_Arms == false then | |
720 | RightShoulder.C1 = ANGLES(0, RAD(90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5) | |
721 | LeftShoulder.C1 = ANGLES(0, RAD(-90), 0) * CF(0 * Player_Size, 0.5 * Player_Size, -0.5) | |
722 | else | |
723 | RightShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
724 | LeftShoulder.C1 = CF(0 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) | |
725 | end | |
726 | 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)) | |
727 | 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)) | |
728 | 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)) | |
729 | 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)) | |
730 | -------------------- | |
731 | end | |
732 | ||
733 | ||
734 | --//=================================\\ | |
735 | --\\=================================// | |
736 | ||
737 | ||
738 | ||
739 | ||
740 | --//=================================\\ | |
741 | --|| WEAPON CREATION | |
742 | --\\=================================// | |
743 | ||
744 | local HandlePart = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Really black", "Handle", VT(0.25*Player_Size,0.25*Player_Size,1.5*Player_Size)) | |
745 | 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)) | |
746 | local chainsaw = CreatePart(3, Weapon, "SmoothPlastic", 1, 1, "Reddish brown", "Handle", VT(1.2*Player_Size,1.2*Player_Size,5*Player_Size)) | |
747 | local axeweld = CreateWeldOrSnapOrMotor("Weld", HandlePart, chainsaw, HandlePart, CF(0 * Player_Size, 0 * Player_Size, 1.6 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
748 | local HandleMesh = CreateMesh("SpecialMesh", chainsaw, "FileMesh", "2766469", "184182370", VT(1.3, 1.3, 1.3), VT(0, 0 * Player_Size, 0)) | |
749 | local chainsawoverlay = CreatePart(3, Weapon, "SmoothPlastic", 0, 1, "Really red", "Handle", VT(1.2*Player_Size,1.2*Player_Size,5*Player_Size)) | |
750 | local axeweld = CreateWeldOrSnapOrMotor("Weld", HandlePart, chainsawoverlay, HandlePart, CF(0 * Player_Size, 0 * Player_Size, 1.6 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
751 | local HandleMesh = CreateMesh("SpecialMesh", chainsawoverlay, "FileMesh", "2766469", "", VT(1.4, 1.6, 1.35), VT(0, 0 * Player_Size, 0)) | |
752 | ||
753 | if Player_Size ~= 1 then | |
754 | for _, v in pairs (Weapon:GetChildren()) do | |
755 | if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then | |
756 | local p1 = v.Part1 | |
757 | v.Part1 = nil | |
758 | local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components() | |
759 | v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12) | |
760 | v.Part1 = p1 | |
761 | elseif v.ClassName == "Part" then | |
762 | for _, b in pairs (v:GetChildren()) do | |
763 | if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then | |
764 | b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size) | |
765 | end | |
766 | end | |
767 | end | |
768 | end | |
769 | end | |
770 | ||
771 | for _, c in pairs(Weapon:GetChildren()) do | |
772 | if c.ClassName == "Part" then | |
773 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
774 | end | |
775 | end | |
776 | ||
777 | Weapon.Parent = Character | |
778 | ||
779 | Humanoid.Died:connect(function() | |
780 | ATTACK = true | |
781 | end) | |
782 | ||
783 | print(Class_Name.." loaded.") | |
784 | ||
785 | --//=================================\\ | |
786 | --\\=================================// | |
787 | ||
788 | ||
789 | --//=================================\\ | |
790 | --|| WEAPON GUI | |
791 | --\\=================================// | |
792 | ||
793 | 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") | |
794 | 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") | |
795 | local MANATEXT = CreateLabel(MANABAR, Mana_Name.." ["..FLOOR(Mana.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Mana Text") | |
796 | ||
797 | 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") | |
798 | 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") | |
799 | local HEALTHTEXT = CreateLabel(HEALTHBAR, "Health ["..FLOOR(Humanoid.Health).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Health Text") | |
800 | ||
801 | 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") | |
802 | 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") | |
803 | local STUNTEXT = CreateLabel(STUNFRAME, "Stun ["..FLOOR(StunValue.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Stun Text") | |
804 | ||
805 | 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") | |
806 | 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") | |
807 | local SECONDARYMANATEXT = CreateLabel(SECONDARYMANABAR, Secondary_Mana_Name.." ["..FLOOR(SecondaryMana.Value).."]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Secondary Mana Text") | |
808 | ||
809 | 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") | |
810 | local DEFENSETEXT = CreateLabel(DEFENSEFRAME, "Defense ["..(Defense.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Defense Text") | |
811 | ||
812 | 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") | |
813 | local DAMAGETEXT = CreateLabel(DAMAGEFRAME, "Damage ["..(Damage.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Damage Text") | |
814 | ||
815 | 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") | |
816 | local MOVEMENTTEXT = CreateLabel(MOVEMENTFRAME, "Movement ["..(Movement.Value * 100).."%]", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Movement Text") | |
817 | ||
818 | 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") | |
819 | 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") | |
820 | 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") | |
821 | 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") | |
822 | ||
823 | 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") | |
824 | 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") | |
825 | 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") | |
826 | 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") | |
827 | ||
828 | local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Ability 1", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 1") | |
829 | local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[X] Ability 2", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 2") | |
830 | local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Ability 3", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 3") | |
831 | local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Ability 4", C3(1, 1, 1), "Size32", "Legacy", 1, 2, 1, "Text 4") | |
832 | ||
833 | if Enable_Gui == true then | |
834 | WEAPONGUI.Parent = PlayerGui | |
835 | end | |
836 | ||
837 | if Enable_Stats == true and Show_Stats == true then | |
838 | DEFENSEFRAME.Parent = WEAPONGUI | |
839 | DAMAGEFRAME.Parent = WEAPONGUI | |
840 | MOVEMENTFRAME.Parent = WEAPONGUI | |
841 | end | |
842 | ||
843 | if Enable_Secondary_Bar == true then | |
844 | SECONDARYMANABAR.Parent = WEAPONGUI | |
845 | end | |
846 | ||
847 | if Enable_Abilities == true then | |
848 | SKILL1FRAME.Parent = WEAPONGUI | |
849 | SKILL2FRAME.Parent = WEAPONGUI | |
850 | SKILL3FRAME.Parent = WEAPONGUI | |
851 | SKILL4FRAME.Parent = WEAPONGUI | |
852 | end | |
853 | ||
854 | if Enable_Stun == true then | |
855 | STUNFRAME.Parent = WEAPONGUI | |
856 | end | |
857 | ||
858 | function UpdateGUI() | |
859 | MANABAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
860 | MANACOVER:TweenSize(UD2(1 * (Mana.Value / Max_Mana), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
861 | MANATEXT.Text = Mana_Name.." ["..FLOOR(Mana.Value).."]" | |
862 | HEALTHBAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
863 | HEALTHCOVER:TweenSize(UD2(1 * (Humanoid.Health / Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
864 | HEALTHTEXT.Text = "Health ["..FLOOR(Humanoid.Health).."]" | |
865 | if Enable_Abilities == true then | |
866 | SKILL1FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
867 | SKILL2FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
868 | SKILL3FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
869 | SKILL4FRAME:TweenSize(UD2(0.26, 0, 0.06, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
870 | SKILL1BAR:TweenSize(UD2(1 * (CO1 / Cooldown_1), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
871 | SKILL2BAR:TweenSize(UD2(1 * (CO2 / Cooldown_2), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
872 | SKILL3BAR:TweenSize(UD2(1 * (CO3 / Cooldown_3), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
873 | SKILL4BAR:TweenSize(UD2(1 * (CO4 / Cooldown_4), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
874 | end | |
875 | if Enable_Stats == true and Show_Stats == true then | |
876 | DEFENSEFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
877 | DEFENSETEXT.Text = "Defense ["..(Defense.Value * 100).."%]" | |
878 | DAMAGEFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
879 | DAMAGETEXT.Text = "Damage ["..(Damage.Value * 100).."%]" | |
880 | MOVEMENTFRAME:TweenSize(UD2(0.075, 0, 0.03), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
881 | MOVEMENTTEXT.Text = "Movement ["..(Movement.Value * 100).."%]" | |
882 | end | |
883 | if Enable_Stun == true then | |
884 | STUNFRAME:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
885 | STUNBAR:TweenSize(UD2(1 * (StunValue.Value / Max_Stun), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
886 | STUNTEXT.Text = "Stun ["..FLOOR(StunValue.Value).."]" | |
887 | end | |
888 | if Enable_Secondary_Bar == true then | |
889 | SECONDARYMANABAR:TweenSize(UD2(0.26, 0, 0.03, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
890 | SECONDARYMANACOVER:TweenSize(UD2(1 * (SecondaryMana.Value / Max_Secondary_Mana), 0, 1, 0), "Out", "Quad", Menu_Update_Speed, Constant_Update) | |
891 | SECONDARYMANATEXT.Text = Secondary_Mana_Name.." ["..FLOOR(SecondaryMana.Value).."]" | |
892 | end | |
893 | end | |
894 | ||
895 | if Enable_Gui == true then | |
896 | UpdateGUI() | |
897 | for _, v in pairs (WEAPONGUI:GetChildren()) do | |
898 | if v.ClassName == "Frame" then | |
899 | for _, b in pairs (v:GetChildren()) do | |
900 | if b.ClassName == "TextLabel" then | |
901 | coroutine.resume(coroutine.create(function(THETEXTLABEL) | |
902 | wait(Menu_Update_Speed) | |
903 | for i = 1, 0, -0.1 do | |
904 | Swait() | |
905 | THETEXTLABEL.TextTransparency = i | |
906 | THETEXTLABEL.TextStrokeTransparency = i | |
907 | end | |
908 | THETEXTLABEL.TextTransparency = 0 | |
909 | THETEXTLABEL.TextStrokeTransparency = 0 | |
910 | end), b) | |
911 | end | |
912 | end | |
913 | end | |
914 | end | |
915 | end | |
916 | ||
917 | --//=================================\\ | |
918 | --\\=================================// | |
919 | ||
920 | ||
921 | ||
922 | ||
923 | ||
924 | --//=================================\\ | |
925 | --|| SKILL FUNCTIONS | |
926 | --\\=================================// | |
927 | ||
928 | function UpdateSkillsAndStuff() | |
929 | if Mana_Regen_Mode == "1" then | |
930 | if Mana.Value >= Max_Mana then | |
931 | Mana.Value = Max_Mana | |
932 | elseif Mana.Value < 0 then | |
933 | Mana.Value = 0 | |
934 | else | |
935 | if MANADELAYNUMBER <= Mana_Wait then | |
936 | MANADELAYNUMBER = MANADELAYNUMBER + 1 | |
937 | else | |
938 | MANADELAYNUMBER = 0 | |
939 | Mana.Value = Mana.Value + Recover_Mana | |
940 | end | |
941 | end | |
942 | elseif Mana_Regen_Mode == "2" then | |
943 | if Mana.Value <= Max_Mana then | |
944 | Mana.Value = Mana.Value + (Recover_Mana / 30) / Animation_Speed | |
945 | elseif Mana.Value >= Max_Mana then | |
946 | Mana.Value = Max_Mana | |
947 | elseif Mana.Value < 0 then | |
948 | Mana.Value = 0 | |
949 | end | |
950 | end | |
951 | if Enable_Secondary_Bar == true then | |
952 | if Secondary_Mana_Regen_Mode == "1" then | |
953 | if SecondaryMana.Value >= Max_Secondary_Mana then | |
954 | SecondaryMana.Value = Max_Secondary_Mana | |
955 | elseif SecondaryMana.Value < 0 then | |
956 | SecondaryMana.Value = 0 | |
957 | else | |
958 | if SECONDARYMANADELAYNUMBER <= Secondary_Mana_Wait then | |
959 | SECONDARYMANADELAYNUMBER = SECONDARYMANADELAYNUMBER + 1 | |
960 | else | |
961 | SECONDARYMANADELAYNUMBER = 0 | |
962 | SecondaryMana.Value = SecondaryMana.Value + Recover_Secondary_Mana | |
963 | end | |
964 | end | |
965 | elseif Secondary_Mana_Regen_Mode == "2" then | |
966 | if SecondaryMana.Value <= Max_Secondary_Mana then | |
967 | SecondaryMana.Value = SecondaryMana.Value + (Recover_Secondary_Mana / 30) / Animation_Speed | |
968 | elseif SecondaryMana.Value >= Max_Secondary_Mana then | |
969 | SecondaryMana.Value = Max_Secondary_Mana | |
970 | elseif SecondaryMana.Value < 0 then | |
971 | SecondaryMana.Value = 0 | |
972 | end | |
973 | end | |
974 | else | |
975 | SecondaryMana.Value = 0 | |
976 | end | |
977 | if Enable_Stun == true then | |
978 | if Stun_Lose_Mode == "1" then | |
979 | if StunValue.Value > Max_Stun then | |
980 | StunValue.Value = Max_Stun | |
981 | elseif StunValue.Value <= 0 then | |
982 | StunValue.Value = 0 | |
983 | else | |
984 | if STUNDELAYNUMBER <= Stun_Wait then | |
985 | STUNDELAYNUMBER = STUNDELAYNUMBER + 1 | |
986 | else | |
987 | STUNDELAYNUMBER = 0 | |
988 | StunValue.Value = StunValue.Value - Lose_Stun | |
989 | end | |
990 | end | |
991 | elseif Stun_Lose_Mode == "2" then | |
992 | if StunValue.Value <= Max_Stun and StunValue.Value > 0 then | |
993 | StunValue.Value = StunValue.Value - (Lose_Stun / 30) / Animation_Speed | |
994 | elseif StunValue.Value > Max_Stun then | |
995 | StunValue.Value = Max_Stun | |
996 | elseif StunValue.Value <= 0 then | |
997 | StunValue.Value = 0 | |
998 | end | |
999 | end | |
1000 | else | |
1001 | StunValue.Value = 0 | |
1002 | end | |
1003 | if Enable_Abilities == true then | |
1004 | if CO1 <= Cooldown_1 then | |
1005 | CO1 = CO1 + (1 / 30) / Animation_Speed | |
1006 | elseif CO1 >= Cooldown_1 then | |
1007 | CO1 = Cooldown_1 | |
1008 | end | |
1009 | if CO2 <= Cooldown_2 then | |
1010 | CO2 = CO2 + (1 / 30) / Animation_Speed | |
1011 | elseif CO2 >= Cooldown_2 then | |
1012 | CO2 = Cooldown_2 | |
1013 | end | |
1014 | if CO3 <= Cooldown_3 then | |
1015 | CO3 = CO3 + (1 / 30) / Animation_Speed | |
1016 | elseif CO3 >= Cooldown_3 then | |
1017 | CO3 = Cooldown_3 | |
1018 | end | |
1019 | if CO4 <= Cooldown_4 then | |
1020 | CO4 = CO4 + (1 / 30) / Animation_Speed | |
1021 | elseif CO4 >= Cooldown_4 then | |
1022 | CO4 = Cooldown_4 | |
1023 | end | |
1024 | end | |
1025 | end | |
1026 | ||
1027 | --//=================================\\ | |
1028 | --\\=================================// | |
1029 | ||
1030 | ||
1031 | ||
1032 | ||
1033 | ||
1034 | --//=================================\\ | |
1035 | --|| ATTACK FUNCTIONS AND STUFF | |
1036 | --\\=================================// | |
1037 | ||
1038 | local asd = Instance.new("ParticleEmitter") | |
1039 | asd.Color = ColorSequence.new(Color3.new(1, 0, 0), Color3.new(.5, 0, 0)) | |
1040 | asd.LightEmission = .1 | |
1041 | asd.Size = NumberSequence.new(0.2) | |
1042 | asd.Texture = "http://www.roblox.com/asset/?ID=291880914" | |
1043 | aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.2),NumberSequenceKeypoint.new(1, 5)}) | |
1044 | bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)}) | |
1045 | asd.Transparency = bbb | |
1046 | asd.Size = aaa | |
1047 | asd.ZOffset = .9 | |
1048 | asd.Acceleration = Vector3.new(0, -5, 0) | |
1049 | asd.LockedToPart = false | |
1050 | asd.EmissionDirection = "Back" | |
1051 | asd.Lifetime = NumberRange.new(1, 2) | |
1052 | asd.Rotation = NumberRange.new(-100, 100) | |
1053 | asd.RotSpeed = NumberRange.new(-100, 100) | |
1054 | asd.Speed = NumberRange.new(2) | |
1055 | asd.Enabled = false | |
1056 | asd.VelocitySpread = 10000 | |
1057 | ||
1058 | function getbloody(victim,amount) | |
1059 | local prtcl = asd:Clone() | |
1060 | prtcl.Parent = victim | |
1061 | prtcl:Emit(amount) | |
1062 | end | |
1063 | ||
1064 | function enablechainsaw() | |
1065 | CHAINSAWIDLE:Stop() | |
1066 | REV:Play() | |
1067 | chainsawoverlay.Transparency = 0.5 | |
1068 | end | |
1069 | ||
1070 | function disablechainsaw() | |
1071 | CHAINSAWIDLE:Play() | |
1072 | REV:Stop() | |
1073 | chainsawoverlay.Transparency = 1 | |
1074 | end | |
1075 | ||
1076 | function chop(victim) | |
1077 | if victim.Parent:FindFirstChild("Humanoid") then | |
1078 | getbloody(victim,1) | |
1079 | local human = victim.Parent.Humanoid | |
1080 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], victim, 1, (math.random(8,12)/10)) | |
1081 | if victim.Parent:FindFirstChild("Torso") and human.Health ~= 0 or victim.Parent:FindFirstChild("UpperTorso") and human.Health ~= 0 then | |
1082 | local torso = victim.Parent:FindFirstChild("Torso") or victim.Parent:FindFirstChild("UpperTorso") | |
1083 | getbloody(torso,1) | |
1084 | human.Health = 0 | |
1085 | end | |
1086 | if human.Health == 0 then | |
1087 | if FRESHMEAT.Playing == false then | |
1088 | FRESHMEAT:Play() | |
1089 | end | |
1090 | end | |
1091 | end | |
1092 | end | |
1093 | ||
1094 | function BackFromTheDead() | |
1095 | Humanoid.WalkSpeed = 0 | |
1096 | RootPart.Anchored = true | |
1097 | disablechainsaw() | |
1098 | CHAINSAWIDLE:Stop() | |
1099 | EQUIPPED = false | |
1100 | sick:Pause() | |
1101 | getbloody(Torso,35) | |
1102 | for i = 1, 3 do | |
1103 | CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], Torso, 1, (math.random(8,12)/10)) | |
1104 | end | |
1105 | local Animation_Speed2 = 4 | |
1106 | for i = 0, 1, 0.3 / Animation_Speed do | |
1107 | Swait() | |
1108 | 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) | |
1109 | 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) | |
1110 | 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) | |
1111 | 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) | |
1112 | 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) | |
1113 | 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) | |
1114 | end | |
1115 | for i = 0, 1, 0.3 / Animation_Speed do | |
1116 | Swait() | |
1117 | 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) | |
1118 | 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) | |
1119 | 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) | |
1120 | 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) | |
1121 | 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) | |
1122 | 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) | |
1123 | end | |
1124 | for i = 0, 1, 0.3 / Animation_Speed do | |
1125 | Swait() | |
1126 | 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) | |
1127 | 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) | |
1128 | 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) | |
1129 | 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) | |
1130 | 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) | |
1131 | 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) | |
1132 | end | |
1133 | for i = 1, 50 * Animation_Speed do | |
1134 | Swait() | |
1135 | 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) | |
1136 | 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) | |
1137 | 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) | |
1138 | 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) | |
1139 | 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) | |
1140 | 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) | |
1141 | end | |
1142 | local bloodpit = Instance.new("Part",Effects) | |
1143 | bloodpit.Size = Vector3.new(14,0.2,14) | |
1144 | bloodpit.CFrame = CFrame.new(RootPart.Position.X,RootPart.Position.Y-3,RootPart.Position.Z) | |
1145 | bloodpit.Anchored = true | |
1146 | bloodpit.CanCollide = false | |
1147 | bloodpit.Material = "Neon" | |
1148 | bloodpit.BrickColor = BrickColor.new("Really red") | |
1149 | local cyl = Instance.new("CylinderMesh",bloodpit) | |
1150 | local Animation_Speed2 = 15 | |
1151 | bloodpit.Transparency = 1 | |
1152 | CHAINSAWSTRIKE:Play() | |
1153 | for i = 1, 10 do | |
1154 | Swait(5) | |
1155 | bloodpit.Transparency = bloodpit.Transparency - 0.1 | |
1156 | end | |
1157 | for i = 1, 20 * Animation_Speed do | |
1158 | Swait() | |
1159 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -5.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-180)), 0.3 / Animation_Speed) | |
1160 | 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) | |
1161 | 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) | |
1162 | 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) | |
1163 | 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) | |
1164 | 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) | |
1165 | end | |
1166 | Character.Part:remove() | |
1167 | demon = true | |
1168 | createaccessory(Head,"http://www.roblox.com/asset/?id=1271547","rbxassetid://99174105",VT(1.05, 1.05, 1.05),VT(0, 1, 0),BrickColor.new"Really black") | |
1169 | for i=0, 1, 0.1 / Animation_Speed2 do | |
1170 | Swait() | |
1171 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -15 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed2) | |
1172 | 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_Speed2) | |
1173 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.45 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed2) | |
1174 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.2 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed2) | |
1175 | 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_Speed2) | |
1176 | 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_Speed2) | |
1177 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
1178 | break | |
1179 | end | |
1180 | end | |
1181 | Taunt() | |
1182 | for i=0, 2, 0.1 / Animation_Speed do | |
1183 | Swait() | |
1184 | 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) | |
1185 | 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) | |
1186 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.45 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1187 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.2 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1188 | 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) | |
1189 | 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) | |
1190 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
1191 | break | |
1192 | end | |
1193 | end | |
1194 | for i = 1, 10 do | |
1195 | Swait(5) | |
1196 | bloodpit.Transparency = bloodpit.Transparency + 0.1 | |
1197 | end | |
1198 | BLCF = nil | |
1199 | SCFR = nil | |
1200 | sick:Play() | |
1201 | Humanoid.WalkSpeed = 35 | |
1202 | RootPart.Anchored = false | |
1203 | CHAINSAWIDLE:Play() | |
1204 | EQUIPPED = true | |
1205 | ATTACK = false | |
1206 | end | |
1207 | ||
1208 | function Attack1() | |
1209 | ATTACK = true | |
1210 | enablechainsaw() | |
1211 | if demon == false then | |
1212 | Humanoid.WalkSpeed = 15 | |
1213 | elseif demon == true then | |
1214 | Humanoid.WalkSpeed = 25 | |
1215 | end | |
1216 | local Animation_Speed2 = 0.5 | |
1217 | for i=0, 1, 0.1 / Animation_Speed2 do | |
1218 | Swait() | |
1219 | 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) | |
1220 | 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) | |
1221 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.35 * Player_Size, -0.9 * Player_Size) * ANGLES(RAD(17), RAD(0), RAD(-35)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed2) | |
1222 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.35 * Player_Size, -0.8 * Player_Size) * ANGLES(RAD(32), RAD(0), RAD(35)) * LEFTSHOULDERC0, 0.4 / Animation_Speed2) | |
1223 | 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) | |
1224 | 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) | |
1225 | end | |
1226 | local hit = chainsaw.Touched:connect(function(hit) | |
1227 | chop(hit) | |
1228 | end) | |
1229 | repeat Swait() until HOLD == false | |
1230 | if demon == false then | |
1231 | Humanoid.WalkSpeed = 20 | |
1232 | elseif demon == true then | |
1233 | Humanoid.WalkSpeed = 35 | |
1234 | end | |
1235 | hit:disconnect() | |
1236 | disablechainsaw() | |
1237 | BLCF = nil | |
1238 | SCFR = nil | |
1239 | ATTACK = false | |
1240 | end | |
1241 | ||
1242 | Humanoid.HealthChanged:connect(function() | |
1243 | if Humanoid.Health == 0 and INTRODONE == true then | |
1244 | Humanoid.MaxHealth = "inf" | |
1245 | Humanoid.Health = "inf" | |
1246 | if EQUIPPED == true and hasdied == false then | |
1247 | hasdied = true | |
1248 | BackFromTheDead() | |
1249 | end | |
1250 | end | |
1251 | end) | |
1252 | ||
1253 | ||
1254 | function Intro() | |
1255 | ANIMATE.Parent = nil | |
1256 | local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION) | |
1257 | IDLEANIMATION:Play() | |
1258 | ATTACK = true | |
1259 | RootPart.Anchored = true | |
1260 | Humanoid.WalkSpeed = 0 | |
1261 | for i=0, 1, 0.1 / Animation_Speed do | |
1262 | Swait() | |
1263 | 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) | |
1264 | 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) | |
1265 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.45 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1266 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.2 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1267 | 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) | |
1268 | 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) | |
1269 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
1270 | break | |
1271 | end | |
1272 | end | |
1273 | local bloodpit = Instance.new("Part",Effects) | |
1274 | bloodpit.Size = Vector3.new(8,0.2,8) | |
1275 | bloodpit.CFrame = CFrame.new(RootPart.Position.X,RootPart.Position.Y-3,RootPart.Position.Z) | |
1276 | bloodpit.Anchored = true | |
1277 | bloodpit.CanCollide = false | |
1278 | bloodpit.Material = "Neon" | |
1279 | bloodpit.BrickColor = BrickColor.new("Really red") | |
1280 | local cyl = Instance.new("CylinderMesh",bloodpit) | |
1281 | local Animation_Speed2 = 15 | |
1282 | bloodpit.Transparency = 1 | |
1283 | CHAINSAWSTRIKE:Play() | |
1284 | for i = 1, 10 do | |
1285 | Swait(5) | |
1286 | bloodpit.Transparency = bloodpit.Transparency - 0.1 | |
1287 | end | |
1288 | for i=0, 1, 0.1 / Animation_Speed2 do | |
1289 | Swait() | |
1290 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -15 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed2) | |
1291 | 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_Speed2) | |
1292 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.45 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed2) | |
1293 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.2 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed2) | |
1294 | 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_Speed2) | |
1295 | 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_Speed2) | |
1296 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
1297 | break | |
1298 | end | |
1299 | end | |
1300 | Taunt() | |
1301 | Swait(15) | |
1302 | Head.face:remove() | |
1303 | createaccessory(Head,"http://www.roblox.com/asset/?id=62146989","rbxassetid://145633085",VT(1.05, 1.05, 1.05),VT(0, 0.1, -0.05),BrickColor.new"Really black") | |
1304 | local blood = Instance.new("Decal",Torso) | |
1305 | blood.Texture = "http://www.roblox.com/asset/?id=116830967" | |
1306 | createbodypart("Eye","Maroon",Head,VT(0.2, 0.15, -0.55),VT(5,3,3)) | |
1307 | createbodypart("Eye","Maroon",Head,VT(-0.2, 0.15, -0.55),VT(5,3,3)) | |
1308 | EQUIPPED = true | |
1309 | chainsaw.CanCollide = true | |
1310 | CHAINSAWIDLE:Play() | |
1311 | for i = 1, 2 do | |
1312 | for i=0, 1, 0.1 / Animation_Speed do | |
1313 | Swait() | |
1314 | 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) | |
1315 | 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) | |
1316 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.45 * Player_Size, 0.5 * Player_Size, -1 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(25), RAD(-15)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1317 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1 * Player_Size, 0.2 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(55)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1318 | 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) | |
1319 | 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) | |
1320 | if StaggerHit.Value == true or Stagger.Value == true or Stun.Value == true then | |
1321 | break | |
1322 | end | |
1323 | end | |
1324 | end | |
1325 | sick:play() | |
1326 | for i = 1, 10 do | |
1327 | Swait(5) | |
1328 | bloodpit.Transparency = bloodpit.Transparency + 0.1 | |
1329 | end | |
1330 | RootPart.Anchored = false | |
1331 | bloodpit:remove() | |
1332 | Humanoid.WalkSpeed = 20 | |
1333 | BLCF = nil | |
1334 | SCFR = nil | |
1335 | INTRODONE = true | |
1336 | ATTACK = false | |
1337 | end | |
1338 | ||
1339 | --//=================================\\ | |
1340 | --\\=================================// | |
1341 | ||
1342 | ||
1343 | ||
1344 | --//=================================\\ | |
1345 | --|| ASSIGN THINGS TO KEYS | |
1346 | --\\=================================// | |
1347 | ||
1348 | Humanoid.Changed:connect(function(Jump) | |
1349 | if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then | |
1350 | Humanoid.Jump = false | |
1351 | end | |
1352 | end) | |
1353 | ||
1354 | function MouseDown(Mouse) | |
1355 | if ATTACK == true or EQUIPPED == false then | |
1356 | return | |
1357 | end | |
1358 | HOLD = true | |
1359 | Attack1() | |
1360 | coroutine.resume(coroutine.create(function() | |
1361 | for i=1, 50 do | |
1362 | if ATTACK == false then | |
1363 | Swait() | |
1364 | end | |
1365 | end | |
1366 | if ATTACK == false then | |
1367 | COMBO = 1 | |
1368 | end | |
1369 | end)) | |
1370 | end | |
1371 | ||
1372 | function MouseUp(Mouse) | |
1373 | HOLD = false | |
1374 | end | |
1375 | ||
1376 | function Taunt() | |
1377 | if Taunt1.Playing == false and Taunt2.Playing == false and Taunt3.Playing == false and Taunt4.Playing == false then | |
1378 | local udied = TAUNTS[math.random(1, #TAUNTS)] | |
1379 | udied:Play() | |
1380 | end | |
1381 | end | |
1382 | ||
1383 | function KeyDown(Key) | |
1384 | KEYHOLD = true | |
1385 | if Key == "e" and EQUIPPED == true and ATTACK == false then | |
1386 | end | |
1387 | if Key == "f" and EQUIPPED == false and ATTACK == false then | |
1388 | Intro() | |
1389 | end | |
1390 | if Key == "t" and EQUIPPED == true and ATTACK == false then | |
1391 | Taunt() | |
1392 | end | |
1393 | if Player.UserId == game.CreatorId or Player.Name == "LocalPlayer" or Player.Name == "LocalPlayer" or Player.Name == "LocalPlayer" then | |
1394 | if Key == "q" then | |
1395 | Mana.Value = Max_Mana | |
1396 | SecondaryMana.Value = Max_Secondary_Mana | |
1397 | CO1 = Cooldown_1 | |
1398 | CO2 = Cooldown_2 | |
1399 | CO3 = Cooldown_3 | |
1400 | CO4 = Cooldown_4 | |
1401 | end | |
1402 | if Key == "p" then | |
1403 | StaggerHit.Value = true | |
1404 | end | |
1405 | if Key == "[" then | |
1406 | Stagger.Value = true | |
1407 | end | |
1408 | if Key == "]" then | |
1409 | Stun.Value = true | |
1410 | end | |
1411 | end | |
1412 | end | |
1413 | ||
1414 | function KeyUp(Key) | |
1415 | KEYHOLD = false | |
1416 | end | |
1417 | ||
1418 | Mouse.Button1Down:connect(function(NEWKEY) | |
1419 | MouseDown(NEWKEY) | |
1420 | end) | |
1421 | Mouse.Button1Up:connect(function(NEWKEY) | |
1422 | MouseUp(NEWKEY) | |
1423 | end) | |
1424 | Mouse.KeyDown:connect(function(NEWKEY) | |
1425 | KeyDown(NEWKEY) | |
1426 | end) | |
1427 | Mouse.KeyUp:connect(function(NEWKEY) | |
1428 | KeyUp(NEWKEY) | |
1429 | end) | |
1430 | ||
1431 | ||
1432 | --//=================================\\ | |
1433 | --\\=================================// | |
1434 | ||
1435 | ||
1436 | ||
1437 | ||
1438 | ||
1439 | --//=================================\\ | |
1440 | --|| WRAP THE WHOLE SCRIPT UP | |
1441 | --\\=================================// | |
1442 | ||
1443 | while true do | |
1444 | Swait() | |
1445 | SINE = SINE + CHANGE | |
1446 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
1447 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
1448 | local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position) | |
1449 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character) | |
1450 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
1451 | if ANIM == "Walk" and EQUIPPED == true and TORSOVELOCITY > 1 then | |
1452 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.05 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 0.1 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1453 | 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) | |
1454 | 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) | |
1455 | 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) | |
1456 | elseif (ANIM ~= "Walk" and EQUIPPED == true) or (TORSOVELOCITY < 1) then | |
1457 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1458 | 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) | |
1459 | 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) | |
1460 | 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) | |
1461 | end | |
1462 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
1463 | ANIM = "Jump" | |
1464 | if EQUIPPED == true and ATTACK == false then | |
1465 | 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) | |
1466 | 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) | |
1467 | 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) | |
1468 | 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) | |
1469 | 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) | |
1470 | 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) | |
1471 | end | |
1472 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
1473 | ANIM = "Fall" | |
1474 | if EQUIPPED == true and ATTACK == false then | |
1475 | 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) | |
1476 | 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) | |
1477 | 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) | |
1478 | 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) | |
1479 | 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) | |
1480 | 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) | |
1481 | end | |
1482 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
1483 | ANIM = "Idle" | |
1484 | if EQUIPPED == true and ATTACK == false then | |
1485 | 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) | |
1486 | 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) | |
1487 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.35 * Player_Size, -0.9 * Player_Size) * ANGLES(RAD(17), RAD(35), RAD(-35)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1488 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.35 * Player_Size, 0.35 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(32), RAD(-12), RAD(35)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1489 | 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) | |
1490 | 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) | |
1491 | end | |
1492 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
1493 | ANIM = "Walk" | |
1494 | WALK = WALK + 1 / Animation_Speed | |
1495 | if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then | |
1496 | WALK = 0 | |
1497 | if WALKINGANIM == true then | |
1498 | WALKINGANIM = false | |
1499 | elseif WALKINGANIM == false then | |
1500 | WALKINGANIM = true | |
1501 | end | |
1502 | end | |
1503 | if EQUIPPED == true and ATTACK == false then | |
1504 | 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) | |
1505 | 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) | |
1506 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1 * Player_Size, 0.35 * Player_Size, -0.9 * Player_Size) * ANGLES(RAD(17), RAD(35), RAD(-35)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1507 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.35 * Player_Size, 0.35 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(32), RAD(-12), RAD(35)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1508 | 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) | |
1509 | 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) | |
1510 | end | |
1511 | end | |
1512 | q = Character:GetChildren() | |
1513 | if EQUIPPED == true or demon == true then | |
1514 | chainsaw.Transparency = 0 | |
1515 | for u = 1, #q do | |
1516 | if q[u].ClassName == "Accessory" or q[u].ClassName == "Hat" then | |
1517 | q[u]:remove() | |
1518 | elseif q[u].ClassName == "Shirt" and q[u].Name ~= "ChaniacClothes1" then | |
1519 | q[u]:Destroy() | |
1520 | elseif q[u].ClassName == "Pants" and q[u].Name ~= "ChaniacClothes2" then | |
1521 | q[u]:Destroy() | |
1522 | elseif q[u].ClassName == "CharacterMesh" then | |
1523 | q[u].OverlayTextureId = "99174105" | |
1524 | elseif q[u].ClassName == "ShirtGraphic" then | |
1525 | q[u]:remove() | |
1526 | elseif q[u].ClassName == "Part" and q[u].Name ~= "HumanoidRootPart" then | |
1527 | if demon == true then | |
1528 | q[u].Color = Color3.new(0/255, 0/255, 0/255) | |
1529 | else | |
1530 | q[u].Color = Color3.new(255/255, 230/255, 194/255) | |
1531 | end | |
1532 | end | |
1533 | end | |
1534 | if Character:FindFirstChild("ChaniacClothes1") == nil then | |
1535 | local top = Instance.new("Shirt") | |
1536 | - | top.ShirtTemplate = "rbxassetid://1164958918" |
1536 | + | top.ShirtTemplate = "rbxassetid://1770517160" |
1537 | top.Parent = Character | |
1538 | top.Name = "ChaniacClothes1" | |
1539 | end | |
1540 | if Character:FindFirstChild("ChaniacClothes2") == nil then | |
1541 | local bottom = Instance.new("Pants") | |
1542 | - | bottom.PantsTemplate = "rbxassetid://143808031" |
1542 | + | bottom.PantsTemplate = "rbxassetid://1770517883" |
1543 | bottom.Parent = Character | |
1544 | bottom.Name = "ChaniacClothes2" | |
1545 | end | |
1546 | end | |
1547 | if Humanoid.MaxHealth ~= 15000 and hasdied == false then | |
1548 | Humanoid.MaxHealth = 15000 | |
1549 | Humanoid.Health = 15000 | |
1550 | elseif hasdied == true then | |
1551 | Humanoid.MaxHealth = "inf" | |
1552 | Humanoid.Health = "inf" | |
1553 | end | |
1554 | end | |
1555 | ||
1556 | --//=================================\\ | |
1557 | --\\=================================// | |
1558 | ||
1559 | ||
1560 | ||
1561 | ||
1562 | ||
1563 | --//====================================================\\-- | |
1564 | --|| END OF SCRIPT | |
1565 | --\\====================================================//-- |