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