SHOW:
|
|
- or go back to the newest paste.
1 | -- Script Made By Huge_Nazo | |
2 | -- Converted By Huge_Nazo | |
3 | -- Help from, turbozester55, GeoMaster, and Vediiz | |
4 | -- If you stole or logged me or plan to use this without hugenazo's consent, please just say that hugenazo at least made this so they can know that im cool guy | |
5 | ||
6 | --[[ | |
7 | __ __ .__ | |
8 | / \ / \_____ ______________|__| ___________ | |
9 | \ \/\/ /\__ \\_ __ \_ __ \ |/ _ \_ __ \ | |
10 | \ / / __ \| | \/| | \/ ( <_> ) | \/ | |
11 | \__/\ / (____ /__| |__| |__|\____/|__| | |
12 | \/ \/ | |
13 | ||
14 | ___. .__ | |
15 | \_ |__ ___.__. | |__ __ __ ____ ____ ____ _____ ____________ | |
16 | | __ < | | | | \| | \/ ___\_/ __ \ / \\__ \ \___ / _ \ | |
17 | | \_\ \___ | | Y \ | / /_/ > ___/| | \/ __ \_/ ( <_> ) | |
18 | |___ / ____| |___| /____/\___ / \___ >___| (____ /_____ \____/ | |
19 | \/\/ \/ /_____/ \/ \/ \/ \/ | |
20 | ||
21 | --]] | |
22 | -- this script is also pretty edibale and stuff and pretty simple but | |
23 | -- still though just rember its made by hugenazo | |
24 | local plr = game.Players.LocalPlayer; repeat wait() until plr.Character | |
25 | local char = plr.Character | |
26 | local hume = char:WaitForChild("Humanoid") | |
27 | local animS = char:WaitForChild("Animate") | |
28 | local mouse = plr:GetMouse() | |
29 | -- | |
30 | local head = char:WaitForChild("Head") | |
31 | local tors = char:WaitForChild("Torso") | |
32 | local rarm = char:WaitForChild("Right Arm") | |
33 | local larm = char:WaitForChild("Left Arm") | |
34 | local rleg = char:WaitForChild("Right Leg") | |
35 | local lleg = char:WaitForChild("Left Leg") | |
36 | local hrp = char:WaitForChild("HumanoidRootPart") | |
37 | -- | |
38 | local hw = tors:WaitForChild("Neck") | |
39 | local tw = hrp:WaitForChild("RootJoint") | |
40 | local raw = tors:WaitForChild("Right Shoulder") | |
41 | local law = tors:WaitForChild("Left Shoulder") | |
42 | local rlw = tors:WaitForChild("Right Hip") | |
43 | local llw = tors:WaitForChild("Left Hip") | |
44 | ||
45 | -- Globals -- | |
46 | ||
47 | local i_n = Instance.new | |
48 | local v3 = Vector3.new | |
49 | local cfn = CFrame.new | |
50 | local cfa = CFrame.Angles | |
51 | local cfe = CFrame.fromEulerAnglesXYZ | |
52 | local bcn = BrickColor.new | |
53 | local c3 = Color3.new | |
54 | local ud2 = UDim2.new | |
55 | ||
56 | function newC3(r, g, b) | |
57 | return c3(r/255, g/255, b/255) | |
58 | end | |
59 | ||
60 | function newPart(p, name, x, y, z, col, trans, ref, anc, cc, prnt) | |
61 | local part = i_n("Part", p) | |
62 | part.Name = name | |
63 | part.Size = v3(x, y, z) | |
64 | part.BrickColor = col | |
65 | part.Reflectance = ref | |
66 | if col == BrickColor.new("Really black") then | |
67 | part.Color = Color3.new(0,0,0) | |
68 | part.Material = Enum.Material.Neon | |
69 | part.Reflectance = 0 | |
70 | end | |
71 | part.Transparency = trans | |
72 | part.Anchored = anc | |
73 | part.CanCollide = cc | |
74 | part.Parent = prnt | |
75 | return part | |
76 | end | |
77 | ||
78 | function newWeld(a, b, c0, c1) | |
79 | local w = i_n("ManualWeld", a) | |
80 | w.Part0 = a; w.Part1 = b | |
81 | if c0 then w.C0 = c0 end | |
82 | if c1 then w.C1 = c1 end | |
83 | return w | |
84 | end | |
85 | ||
86 | function newAnim(id) | |
87 | local anim = i_n("Animation") | |
88 | anim.AnimationId = "http://www.roblox.com/asset/?id="..id | |
89 | anim = hume:LoadAnimation(anim) | |
90 | return anim | |
91 | end | |
92 | ||
93 | function newSound(id, p, vol, pit, loop, por) | |
94 | local s = i_n("Sound", p) | |
95 | s.SoundId = "rbxassetid://"..id | |
96 | s.Volume = vol; s.Pitch = pit | |
97 | s.Looped = loop; s.PlayOnRemove = por | |
98 | return s | |
99 | end | |
100 | ||
101 | -- Global Variables -- | |
102 | local ogdefWS = 16 | |
103 | local defWS = 16 | |
104 | local bdmg = 20 | |
105 | local combostep = 1 | |
106 | local combowait = 2 | |
107 | local combotime = tick() | |
108 | ||
109 | local equipped = false | |
110 | local active = false | |
111 | local running = false | |
112 | local jumping = false | |
113 | local lwoverride = false | |
114 | local softoverride = false | |
115 | local wsoverride = false | |
116 | ||
117 | local pausedanims = {} | |
118 | local bAttacks = {} | |
119 | local bAbilities = {} | |
120 | local abilities = { | |
121 | {["name"] = "Guard", | |
122 | ["cd"] = 6, | |
123 | ["ccd"] = 0, | |
124 | ["key"] = "E", | |
125 | ["ready"] = true, | |
126 | }, | |
127 | {["name"] = "Upper-cutter", | |
128 | ["cd"] = 12, | |
129 | ["ccd"] = 0, | |
130 | ["key"] = "Z", | |
131 | ["ready"] = true, | |
132 | }, | |
133 | {["name"] = "Bash", | |
134 | ["cd"] = 7, | |
135 | ["ccd"] = 0, | |
136 | ["key"] = "X", | |
137 | ["ready"] = true, | |
138 | }, | |
139 | {["name"] = "Enrage", | |
140 | ["cd"] = 17, | |
141 | ["ccd"] = 0, | |
142 | ["key"] = "C", | |
143 | ["ready"] = true, | |
144 | }, | |
145 | {["name"] = "Piercing Lunge", | |
146 | ["cd"] = 35, | |
147 | ["ccd"] = 0, | |
148 | ["key"] = "V", | |
149 | ["ready"] = true, | |
150 | } | |
151 | } | |
152 | ||
153 | ----- Instances ------ | |
154 | local bdmg = i_n("NumberValue", script);bdmg.Value = 10 | |
155 | local atkspd = i_n("NumberValue", script);atkspd.Value = 1 | |
156 | local atkrange = i_n("NumberValue", script);atkrange.Value = 3 | |
157 | local critc = i_n("NumberValue", script);critc.Value = 25 | |
158 | local cancastab = i_n("BoolValue", script);cancastab.Name = "CanCastAbilities";cancastab.Value = true | |
159 | local rage = Instance.new("ParticleEmitter", script) | |
160 | rage.Name = "rage" | |
161 | rage.Rate = (60) | |
162 | rage.Speed = NumberRange.new(0,0) | |
163 | rage.VelocitySpread = (0) | |
164 | rage.Transparency = NumberSequence.new(1,.2) | |
165 | rage.LightEmission = (1) | |
166 | rage.Acceleration = v3(0,50,0) | |
167 | rage.Lifetime = NumberRange.new(.145,.145) | |
168 | rage.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,4),NumberSequenceKeypoint.new(1,5)}) | |
169 | rage.Texture = "rbxassetid://347730682" | |
170 | rage.Rotation = NumberRange.new(-15,15) | |
171 | rage.RotSpeed = NumberRange.new(-25,25) | |
172 | local color1 = Color3.new(1,0,0) | |
173 | local color2 = Color3.new(0.5,0,0) | |
174 | rage.Color = ColorSequence.new(color1,color2) | |
175 | rage.Enabled = false | |
176 | ||
177 | local ragelight = i_n("PointLight", script) | |
178 | ragelight.Name = "ragelight" | |
179 | ragelight.Color = c3(1,.02,0) | |
180 | ragelight.Brightness = 2 | |
181 | ragelight.Range = 8 | |
182 | ragelight.Shadows = true | |
183 | ragelight.Enabled = false | |
184 | ||
185 | local Electricity = Instance.new("ParticleEmitter", script) | |
186 | Electricity.Name = "Electricity" | |
187 | Electricity.Rate = (80) | |
188 | Electricity.Speed = NumberRange.new(0,0) | |
189 | Electricity.VelocitySpread = (0) | |
190 | Electricity.Transparency = NumberSequence.new(0,0) | |
191 | Electricity.LightEmission = (1) | |
192 | Electricity.Lifetime = NumberRange.new(0.075,0.075) | |
193 | Electricity.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(1,1.15)}) | |
194 | Electricity.Texture = "rbxassetid://347730682" | |
195 | Electricity.Rotation = NumberRange.new(-360,360) | |
196 | Electricity.RotSpeed = NumberRange.new(-25,25) | |
197 | local color1 = Color3.new(1,.8,0.1) | |
198 | local color2 = Color3.new(1,.8,0.1) | |
199 | Electricity.Color = ColorSequence.new(color1,color2) | |
200 | Electricity.Enabled = false | |
201 | ||
202 | local dfunc = { | |
203 | function(hitHumanoid, damage, owner, crit) | |
204 | damage = math.huge | |
205 | if hitHumanoid == owner then return end | |
206 | local debris = game:GetService("Debris") | |
207 | local p=Instance.new("Part",workspace);p.CanCollide=false;p.Transparency=1;p.Size=Vector3.new(.2,.2,.2);p.CFrame=hitHumanoid.Parent.Torso.CFrame+Vector3.new(math.random(-1,1),math.random(1,2),math.random(-1,1));p.Anchored = true | |
208 | local g=Instance.new("BillboardGui",p);g.Size=UDim2.new(2.5,0,2.5,0);g.Adornee=p;g.AlwaysOnTop=true | |
209 | local t=Instance.new("TextLabel",g);t.BackgroundTransparency=1;t.TextStrokeTransparency=0;t.Size=UDim2.new(1,0,1,0);t.TextScaled=true;t.Font= Enum.Font.Fantasy | |
210 | ||
211 | -- ======================================================================================== | |
212 | if damage <= -1 then -- player is being healed | |
213 | t:TweenPosition(UDim2.new(0,0,-1,0),'Out','Sine',1.25) | |
214 | t.Text = "+"..( math.abs( math.floor((damage))).."") | |
215 | t.TextColor3=BrickColor.new("Lime green").Color | |
216 | t.TextStrokeColor3=BrickColor.new("Really black").Color | |
217 | local s=Instance.new("Sound", hitHumanoid.Parent.Torso) | |
218 | s.SoundId="rbxassetid://535405197" | |
219 | s.Volume = 1 | |
220 | s.Pitch = 1.15 | |
221 | s:Play() | |
222 | hitHumanoid:TakeDamage(damage) | |
223 | debris:AddItem(s,1) | |
224 | debris:AddItem(p,1.45) | |
225 | spawn(function() for i = 0,1,.1 do t.TextTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
226 | -- ======================================================================================== | |
227 | ||
228 | -- ======================================================================================== | |
229 | elseif hitHumanoid.Parent:FindFirstChild("ForceField") ~= nil or hitHumanoid.Parent:FindFirstChild("Blocking") then -- player is blocking attack or has forcefield | |
230 | t:TweenPosition(UDim2.new(0,0,-0.1,0),'Out','Sine',2) | |
231 | t.Text = "Blocked!" | |
232 | t.TextColor3=BrickColor.new("Really blue").Color | |
233 | t.TextStrokeColor3=BrickColor.new("Really black").Color | |
234 | g.Size=UDim2.new(25,0,25,0) | |
235 | local s=Instance.new("Sound", hitHumanoid.Parent.Torso) | |
236 | s.SoundId="rbxassetid://135436314" | |
237 | s.Volume = 0.25 | |
238 | s.Pitch = 0.825 | |
239 | s:Play() | |
240 | debris:AddItem(s,1) | |
241 | debris:AddItem(p,.95) | |
242 | spawn(function() for i = 0,1,.1 do t.TextTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
243 | -- ======================================================================================== | |
244 | ||
245 | -- ======================================================================================== | |
246 | elseif damage <= 0 or hitHumanoid.Parent:FindFirstChild("Dodging") then -- player takes 0 damage therefore dodging the attack | |
247 | t:TweenPosition(UDim2.new(0,0,-1,0),'Out','Sine',.9) | |
248 | t.Text = "Dodge!" | |
249 | t.TextColor3=BrickColor.new("Ghost grey").Color | |
250 | t.TextStrokeColor3=BrickColor.new("Really black").Color | |
251 | local s=Instance.new("Sound", hitHumanoid.Parent.Torso) | |
252 | s.SoundId="rbxasset://sounds/swoosh.wav" | |
253 | s.Volume = 1 | |
254 | s.Pitch = 2 | |
255 | s:Play() | |
256 | debris:AddItem(s,1) | |
257 | debris:AddItem(p,.85) | |
258 | spawn(function() for i = 0,1,.1 do t.TextTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
259 | -- ======================================================================================== | |
260 | ||
261 | -- ======================================================================================== | |
262 | elseif crit then -- player dealt critical strike | |
263 | t:TweenPosition(UDim2.new(0,0,-1,0),'Out','Sine',.9) | |
264 | t.Text = "-"..( math.abs( math.floor((damage))).."!") | |
265 | t.TextColor3=BrickColor.new("Deep orange").Color | |
266 | t.TextStrokeColor3=BrickColor.new("Maroon").Color | |
267 | t.ZIndex=3 | |
268 | local a=Instance.new("ImageLabel", t) | |
269 | a.Size = UDim2.new(1,0,1,0) | |
270 | a.BackgroundTransparency = 1 | |
271 | a.Image = "rbxassetid://649624738" | |
272 | a.ImageColor3 = BrickColor.new("Deep orange").Color | |
273 | a.ZIndex=2 | |
274 | local s=Instance.new("Sound", hitHumanoid.Parent.Torso) | |
275 | s.SoundId="rbxassetid://488886309" | |
276 | s.Volume = 1 | |
277 | s.Pitch = 2.35 | |
278 | s:Play() | |
279 | hitHumanoid:TakeDamage(damage) | |
280 | debris:AddItem(s,1) | |
281 | debris:AddItem(p,.85) | |
282 | spawn(function() for i = 0,1,.1 do t.TextTransparency=i;a.ImageTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
283 | -- ======================================================================================== | |
284 | ||
285 | -- ======================================================================================== | |
286 | elseif hitHumanoid.Parent:FindFirstChild("ArmorBroken") then -- player dealt more damage to this unit (double damage) | |
287 | t:TweenPosition(UDim2.new(0,0,-1,0),'Out','Sine',.9) | |
288 | t.Text = "-"..( math.abs( math.floor((damage*2))).."!") | |
289 | t.TextColor3=BrickColor.new("Royal purple").Color | |
290 | t.TextStrokeColor3=BrickColor.new("Really black").Color | |
291 | t.ZIndex=2 | |
292 | local s=Instance.new("Sound", hitHumanoid.Parent.Torso) | |
293 | s.SoundId="rbxassetid://488886309" | |
294 | s.Volume = 1 | |
295 | s.Pitch = 2 | |
296 | s:Play() | |
297 | hitHumanoid:TakeDamage(damage*2) | |
298 | debris:AddItem(s,1) | |
299 | debris:AddItem(p,.85) | |
300 | spawn(function() for i = 0,1,.1 do t.TextTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
301 | -- ======================================================================================== | |
302 | ||
303 | -- ======================================================================================== | |
304 | elseif hitHumanoid.Parent:FindFirstChild("GuardUp") then -- player is taking less damage (gets dealt less) | |
305 | t:TweenPosition(UDim2.new(0,0,-1,0),'Out','Sine',.9) | |
306 | t.Text = "-"..( math.abs( math.floor((damage/2))).."") | |
307 | t.TextColor3=BrickColor.new("Bright blue").Color | |
308 | t.TextStrokeColor3=BrickColor.new("Really black").Color | |
309 | t.ZIndex=2 | |
310 | local s=Instance.new("Sound", hitHumanoid.Parent.Torso) | |
311 | s.SoundId="rbxassetid://199149338" | |
312 | s.Volume = 1 | |
313 | s.Pitch = 1.1 | |
314 | s:Play() | |
315 | hitHumanoid:TakeDamage(damage/2) | |
316 | debris:AddItem(s,1) | |
317 | debris:AddItem(p,.85) | |
318 | spawn(function() for i = 0,1,.1 do t.TextTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
319 | -- ======================================================================================== | |
320 | ||
321 | -- ======================================================================================== | |
322 | elseif damage >= (hitHumanoid.MaxHealth * .25) then -- player dealt high amount of damage | |
323 | t:TweenPosition(UDim2.new(0,0,-1,0),'Out','Sine',1) | |
324 | t.Text = "-"..( math.abs( math.floor((damage))).." !") | |
325 | t.TextColor3=BrickColor.new("Really red").Color | |
326 | t.TextStrokeColor3=BrickColor.new("Really black").Color | |
327 | local s=Instance.new("Sound", hitHumanoid.Parent.Torso) | |
328 | s.SoundId="rbxassetid://199149137" | |
329 | s.Volume = 0.5 | |
330 | s.Pitch = 1.25 | |
331 | s:Play() | |
332 | hitHumanoid:TakeDamage(damage) | |
333 | debris:AddItem(s,1) | |
334 | debris:AddItem(p,1) | |
335 | spawn(function() for i = 0,1,.1 do t.TextTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
336 | -- ======================================================================================== | |
337 | ||
338 | -- ======================================================================================== | |
339 | else -- player takes normal damage | |
340 | t:TweenPosition(UDim2.new(0,0,-1,0),'Out','Sine',.9) | |
341 | t.Text = "-"..( math.abs( math.floor((damage)))) | |
342 | t.TextColor3=BrickColor.new("Bright yellow").Color | |
343 | t.TextStrokeColor3=BrickColor.new("Really black").Color | |
344 | local s=Instance.new("Sound", hitHumanoid.Parent.Torso) | |
345 | s.SoundId="rbxassetid://199149137" | |
346 | s.Volume = 0.5 | |
347 | s.Pitch = 1 | |
348 | s:Play() | |
349 | hitHumanoid:TakeDamage(damage) | |
350 | debris:AddItem(s,1) | |
351 | debris:AddItem(p,.95) | |
352 | spawn(function()for i = 0,1,.2 do t.TextTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
353 | end | |
354 | end | |
355 | } | |
356 | ||
357 | local weapon = i_n("Model", char);weapon.Name = "Weapon" | |
358 | ||
359 | local handl = newPart(i_n("Part"),"Handle",0.51, 1.36, 0.51,BrickColor.new("Maroon"), 0, 0, false, false, weapon) | |
360 | local newmesh = i_n("CylinderMesh",handl) | |
361 | handl.CFrame = cfn(-4.4, 1.02, 4.4) | |
362 | ||
363 | local pommel = newPart(i_n("Part"),"Pommel",0.34, 0.34, 0.51,BrickColor.new("Crimson"), 0, 0, false, false, weapon) | |
364 | local newmesh = i_n("SpecialMesh",pommel);newmesh.MeshType = "Torso"; newmesh.Scale = v3(2,1,1) | |
365 | pommel.CFrame = cfn(-4.4, 0.17, 4.4) | |
366 | pommel.Rotation = v3(180, 90, 0) | |
367 | ||
368 | local bladetip = newPart(i_n("Part"),"BladeTip",0.2, 0.2, 0.85,BrickColor.new("Really black"), 0, .3, false, false, weapon) | |
369 | local newmesh = i_n("SpecialMesh",bladetip);newmesh.MeshType = "FileMesh";newmesh.MeshId = "http://www.roblox.com/Asset/?id=9756362" ;newmesh.Scale = v3(0.235, 1.7, 0.604) | |
370 | bladetip.CFrame = cfn(-4.4, 5.44, 4.4) | |
371 | ||
372 | local grip = newPart(i_n("Part"),"Grip",0.51, 1.19, 0.51,BrickColor.new("Maroon"), 0, 0, false, false, weapon) | |
373 | local newmesh = i_n("SpecialMesh",grip);newmesh.MeshType = "Head"; newmesh.Scale = v3(1.2,1,1.2) | |
374 | grip.CFrame = cfn(-4.4, 1.02, 4.4) | |
375 | ||
376 | local frontblade = newPart(i_n("Part"),"Blade",0.85, 0.17, 3.4,BrickColor.new("Really black"), 0, .3, false, false, weapon) | |
377 | local newmesh = i_n("SpecialMesh",frontblade);newmesh.MeshType = "Torso" | |
378 | frontblade.CFrame = cfn(-4.315, 3.74, 4.4) | |
379 | frontblade.Rotation = v3(-90, 0, -90) | |
380 | ||
381 | local backblade = newPart(i_n("Part"),"Part",0.85, 0.17, 3.4,BrickColor.new("Really black"), 0, .3, false, false, weapon) | |
382 | local newmesh = i_n("SpecialMesh",backblade);newmesh.MeshType = "Torso" | |
383 | backblade.CFrame = cfn(-4.485, 3.74, 4.4) | |
384 | backblade.Rotation = v3(-90, 0, 90) | |
385 | ||
386 | local hilt1 = newPart(i_n("Part"),"Part",0.68, 0.34, 0.51,BrickColor.new("Maroon"), 0, 0, false, false, weapon) | |
387 | local newmesh = i_n("SpecialMesh",hilt1);newmesh.MeshType = "Torso"; newmesh.Scale = v3(2,1,1) | |
388 | hilt1.CFrame = cfn(-4.4, 1.87, 4.4) | |
389 | hilt1.Rotation = v3(180,90, 0) | |
390 | ||
391 | local hilt2 = newPart(i_n("Part"),"Part",1.02, 0.2, 0.37,BrickColor.new("Maroon"), 0, 0, false, false, weapon) | |
392 | local newmesh = i_n("SpecialMesh",hilt2);newmesh.MeshType = "Torso"; newmesh.Scale = v3(2,1,1) | |
393 | hilt2.CFrame = cfn(-4.4, 1.87, 4.4) | |
394 | hilt2.Rotation = v3(180, 90, 0) | |
395 | ||
396 | local pe = Instance.new("ParticleEmitter", frontblade) | |
397 | pe.Name = "dark" | |
398 | local col1 = BrickColor.new("Really black").Color | |
399 | local col2 = BrickColor.new("Maroon").Color | |
400 | pe.Color = ColorSequence.new(col1, col2) | |
401 | pe.LightEmission = 0.5 | |
402 | pe.Lifetime = NumberRange.new(1.5) | |
403 | pe.Speed = NumberRange.new(0.5) | |
404 | pe.SpreadAngle = Vector2.new(360, 360) | |
405 | pe.RotSpeed = NumberRange.new(20) | |
406 | pe.Rotation = NumberRange.new(0,180) | |
407 | pe.VelocityInheritance = 0.5 | |
408 | pe.LockedToPart = true | |
409 | pe.Rate = 250 | |
410 | pe.Texture = "http://www.roblox.com/asset/?id=246400798" | |
411 | pe.Size = NumberSequence.new(0.5) | |
412 | pe.Transparency = NumberSequence.new({ | |
413 | NumberSequenceKeypoint.new(0, 0), | |
414 | NumberSequenceKeypoint.new(1, 1) | |
415 | }) | |
416 | ||
417 | function weld(x, y) | |
418 | if x == y then return end | |
419 | local CJ = CFrame.new(x.Position) | |
420 | local w = Instance.new("ManualWeld") | |
421 | w.Part0 = x | |
422 | w.Part1 = y | |
423 | w.C0 = x.CFrame:inverse() * CJ | |
424 | w.C1 = y.CFrame:inverse() * CJ | |
425 | w.Parent = x | |
426 | return w | |
427 | end | |
428 | ||
429 | local model = weapon | |
430 | ||
431 | for _,v in pairs(model:GetChildren()) do | |
432 | if v:IsA("BasePart") then | |
433 | weld(model.Handle, v) | |
434 | end end | |
435 | ||
436 | local handle = weapon:WaitForChild("Handle") | |
437 | local idletrack = newAnim(180435571) | |
438 | ||
439 | ----- New Instances ------ | |
440 | ||
441 | local backweld = newWeld(tors, handle) | |
442 | backweld.C0 = cfn(1.5, 1.5, .5) * cfa(0, math.rad(90), 0) * cfa(math.rad(-135), 0, 0) | |
443 | ||
444 | local grip = newWeld(rarm, nil, cfn(0, -.7, 0) * cfa(math.rad(-90), 0, 0)) | |
445 | ||
446 | local equipS = newSound(211059653, handle, 1, 1, false, false) | |
447 | local uneqS = newSound(166196557, handle, 1, 1, false, false) | |
448 | ||
449 | local slash1 = newSound(199145841, handle, 1, 1, false, false) | |
450 | local slash2 = newSound(199145841, handle, 1, 1.2, false, false) | |
451 | local slash3 = newSound(356422588, handle, 1, 1, false, false) | |
452 | local slash3 = newSound(356422588, handle, 1, 1.2, false, false) | |
453 | ||
454 | local skill1 = newSound(231917758, handle, 1, .85, false, false) | |
455 | local skill2 = newSound(2767090, handle, 1, .85, false, false) | |
456 | local skill3 = newSound(662614920,handle,1,1,false,false) | |
457 | local skill4 = newSound(2101137,handle,1,.45,false,false) | |
458 | local skill42 = newSound(540358153,handle,1,.7,false,false) | |
459 | ||
460 | ----- Animation Defaults ------ | |
461 | ||
462 | local stand = { | |
463 | ["head"] = hw.C0, | |
464 | ["tors"] = tw.C1, | |
465 | ["rarm"] = raw.C0, | |
466 | ["larm"] = law.C0, | |
467 | ["rleg"] = rlw.C0, | |
468 | ["lleg"] = llw.C0, | |
469 | ["grip0"] = grip.C0, | |
470 | ["grip1"] = grip.C1 | |
471 | } | |
472 | ||
473 | local neutral = { | |
474 | ["head"] = stand.head * cfa(0, 0, math.rad(-10)), | |
475 | ["tors"] = stand.tors * cfa(0, 0, math.rad(-10)), | |
476 | ["rarm"] = stand.rarm * cfa(math.rad(-15), math.rad(-25), math.rad(-5)), | |
477 | ["larm"] = stand.larm * cfa(math.rad(-10), 0, 0), | |
478 | ["rleg"] = stand.rleg * cfa(0, math.rad(-24), 0), | |
479 | ["lleg"] = stand.lleg * cfa(0, math.rad(8), 0), | |
480 | ["grip0"] = stand.grip0, | |
481 | ["grip1"] = stand.grip1 | |
482 | } | |
483 | ||
484 | local run = { | |
485 | ["head"] = stand.head * cfa(math.rad(8), 0, 0), | |
486 | ["tors"] = stand.tors, | |
487 | ["rarm"] = stand.rarm * cfa(math.rad(-20), math.rad(-15), math.rad(-5)), | |
488 | ["larm"] = stand.larm * cfa(math.rad(-15), math.rad(-10), math.rad(-5)), | |
489 | ["rleg"] = stand.rleg, | |
490 | ["lleg"] = stand.lleg, | |
491 | ["grip0"] = stand.grip0, | |
492 | ["grip1"] = stand.grip1 * cfa(math.rad(15), 0, 0) | |
493 | } | |
494 | ||
495 | local jump = { | |
496 | ["head"] = stand.head * cfa(math.rad(-15), 0, 0), | |
497 | ["tors"] = stand.tors, | |
498 | ["rarm"] = stand.rarm * cfa(0, 0, math.rad(60)), | |
499 | ["larm"] = stand.larm * cfa(math.rad(-24), 0, 0), | |
500 | ["rleg"] = stand.rleg * cfn(.5, 0, 0) * cfa(0, 0, math.rad(-15)), | |
501 | ["lleg"] = stand.lleg * cfn(-1, 1, 0) * cfa(0, 0, math.rad(15)), | |
502 | ["grip0"] = stand.grip0, | |
503 | ["grip1"] = stand.grip1 | |
504 | } | |
505 | ||
506 | local fall = { | |
507 | ["head"] = stand.head * cfa(math.rad(15), 0, 0), | |
508 | ["tors"] = stand.tors, | |
509 | ["rarm"] = stand.rarm * cfn(0, -.5, .2) * cfa(math.rad(-70), 0, 0), | |
510 | ["larm"] = stand.larm * cfn(0, -.5, .2) * cfa(math.rad(-70), 0, 0), | |
511 | ["rleg"] = stand.rleg * cfa(0, 0, math.rad(9)), | |
512 | ["lleg"] = stand.lleg * cfn(-1, 1, 0) * cfa(0, 0, math.rad(15)), | |
513 | ["grip0"] = stand.grip0, | |
514 | ["grip1"] = stand.grip1 | |
515 | } | |
516 | ||
517 | local stunned = { | |
518 | ["head"] = stand.head, | |
519 | ["tors"] = stand.tors * cfn(0, -2.25, 0) *cfa(math.rad(90),0,0), | |
520 | ["rarm"] = stand.rarm * cfn(0, -.5, .2) * cfa(math.rad(-40), 0, 0), | |
521 | ["larm"] = stand.larm * cfn(0, -.5, .2) * cfa(math.rad(-40), 0, 0), | |
522 | ["rleg"] = stand.rleg * cfa(math.rad(-15), 0, 0), | |
523 | ["lleg"] = stand.lleg * cfa( math.rad(-15), 0, 0), | |
524 | ["grip0"] = stand.grip0, | |
525 | ["grip1"] = stand.grip1 * cfa(math.rad(90),0,0) | |
526 | } | |
527 | ------ Primary Functions ------ | |
528 | ||
529 | ||
530 | ArtificialHB = Instance.new("BindableEvent", script) | |
531 | ArtificialHB.Name = "Heartbeat" | |
532 | ||
533 | script:WaitForChild("Heartbeat") | |
534 | ||
535 | ||
536 | --credit to saz/nym for this pacemaker | |
537 | frame = 1 / 60 | |
538 | tf = 0 | |
539 | allowframeloss = false | |
540 | tossremainder = false | |
541 | lastframe = tick() | |
542 | script.Heartbeat:Fire() | |
543 | ||
544 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
545 | tf = tf + s | |
546 | if tf >= frame then | |
547 | if allowframeloss then | |
548 | script.Heartbeat:Fire() | |
549 | lastframe = tick() | |
550 | else | |
551 | for i = 1, math.floor(tf / frame) do | |
552 | script.Heartbeat:Fire() | |
553 | end | |
554 | lastframe = tick() | |
555 | end | |
556 | if tossremainder then | |
557 | tf = 0 | |
558 | else | |
559 | tf = tf - frame * math.floor(tf / frame) | |
560 | end | |
561 | end | |
562 | end) | |
563 | ||
564 | function swait(num) | |
565 | if num == 0 or num == nil then | |
566 | ArtificialHB.Event:wait() | |
567 | else | |
568 | for i = 0, num do | |
569 | ArtificialHB.Event:wait() | |
570 | end | |
571 | end | |
572 | end | |
573 | ||
574 | function stopAnims() | |
575 | pausedanims = {} | |
576 | ||
577 | for _,v in pairs(hume:GetPlayingAnimationTracks()) do v:Stop() | |
578 | table.insert(pausedanims, v) | |
579 | end end | |
580 | ||
581 | function resumeAnims() | |
582 | for _,v in pairs(pausedanims) do v:Play() | |
583 | end end | |
584 | ||
585 | function resetJoints() | |
586 | hw.C0 = stand.head; tw.C1 = stand.tors | |
587 | raw.C0 = stand.rarm; law.C0 = stand.larm | |
588 | rlw.C0 = stand.rleg; llw.C0 = stand.lleg | |
589 | grip.C0 = stand.grip0; grip.C1 = stand.grip1 | |
590 | end | |
591 | ||
592 | function equip() | |
593 | local t = 15 | |
594 | animS.Disabled = true; stopAnims() | |
595 | resetJoints() | |
596 | ||
597 | for i = 1, t do swait() | |
598 | raw.C0 = raw.C0:lerp(stand.rarm * cfa(0, 0, math.rad(172)), (i/t)/2) | |
599 | law.C0 = law.C0:lerp(neutral.larm, i/t) | |
600 | hw.C0 = hw.C0:lerp(neutral.head, i/t) | |
601 | tw.C1 = tw.C1:lerp(neutral.tors, i/t) | |
602 | end | |
603 | ||
604 | backweld.Part1 = nil; grip.Part1 = handle | |
605 | idletrack:Play(); equipS:Play() | |
606 | end | |
607 | ||
608 | function unequip() | |
609 | local t = 15 | |
610 | ||
611 | lwoverride = true | |
612 | ||
613 | for i = 1, t do swait() | |
614 | raw.C0 = raw.C0:lerp(stand.rarm * cfa(0, 0, math.rad(172)), (i/t)/2) | |
615 | law.C0 = law.C0:lerp(stand.larm, i/t) | |
616 | hw.C0 = hw.C0:lerp(stand.head, i/t) | |
617 | tw.C1 = tw.C1:lerp(stand.tors, i/t) | |
618 | rlw.C0 = rlw.C0:lerp(stand.rleg, i/t) | |
619 | llw.C0 = llw.C0:lerp(stand.lleg, i/t) | |
620 | end | |
621 | ||
622 | uneqS:Play() | |
623 | grip.Part1 = nil; backweld.Part1 = handle | |
624 | idletrack:Stop(); animS.Disabled = false | |
625 | resetJoints(); resumeAnims() | |
626 | lwoverride = false | |
627 | end | |
628 | ||
629 | function checkPartMag(list, range) | |
630 | local targets = {} | |
631 | ||
632 | for _,v in pairs(list) do | |
633 | for _,x in pairs(workspace:GetChildren()) do | |
634 | local vhume = x:FindFirstChild("Humanoid") | |
635 | if vhume and vhume:IsA("Humanoid") then | |
636 | for _,y in pairs(x:GetChildren()) do | |
637 | if y:IsA("BasePart") and (v.Position - y.Position).magnitude <= range | |
638 | then table.insert(targets, x); break end | |
639 | end end end end | |
640 | ||
641 | return targets | |
642 | end | |
643 | ||
644 | ||
645 | function checkPartMag2(list, range) | |
646 | local targets = {} | |
647 | ||
648 | for _,v in pairs(list) do | |
649 | for _,x in pairs(workspace:GetChildren()) do | |
650 | local vhume = x:FindFirstChild("Humanoid") | |
651 | if vhume and vhume:IsA("Humanoid") then | |
652 | for _,y in pairs(x:GetChildren()) do | |
653 | if y:IsA("BasePart") and (v.Position - y.Position).magnitude <= range | |
654 | then table.insert(targets, x); break end | |
655 | end end end end | |
656 | ||
657 | return targets | |
658 | end | |
659 | ||
660 | function checkPosMag(pos, range) | |
661 | local targets = {} | |
662 | ||
663 | for _,x in pairs(workspace:GetChildren()) do | |
664 | local vhume = x:FindFirstChild("Humanoid") | |
665 | if vhume and vhume:IsA("Humanoid") then | |
666 | for _,y in pairs(x:GetChildren()) do | |
667 | if y:IsA("BasePart") and (pos - y.Position).magnitude <= range | |
668 | then table.insert(targets, x) | |
669 | print(x.Name) end | |
670 | end end end | |
671 | ||
672 | return targets | |
673 | end | |
674 | ||
675 | function rollTheDice(chance, min, max) | |
676 | local gen = math.random(min, max) | |
677 | return gen <= chance | |
678 | end | |
679 | ||
680 | function strike(targ, dmg, critchance) | |
681 | local moddmg = math.floor(dmg) | |
682 | local crit = false | |
683 | ||
684 | if targ == char then return end | |
685 | ||
686 | local vhume = targ:FindFirstChild("Humanoid") | |
687 | if vhume and vhume:IsA("Humanoid") then | |
688 | moddmg = math.ceil(moddmg * (math.random(75, 150)/100)) | |
689 | ||
690 | if rollTheDice(critchance, 1, 100) then | |
691 | moddmg = moddmg * 2; crit = true | |
692 | end | |
693 | ||
694 | dfunc[1](vhume, moddmg, hume, crit) | |
695 | end end | |
696 | ||
697 | function cooldown(num) | |
698 | local ab = abilities[num] | |
699 | local now = tick() | |
700 | ||
701 | spawn(function() | |
702 | ab.ready = false | |
703 | ab.ccd = ab.cd | |
704 | ||
705 | while ab.ccd > 0 do swait() | |
706 | ||
707 | repeat swait() until (tick()-now) >= 1 | |
708 | or ab.ccd <= 0 | |
709 | ||
710 | if ab.ccd > 0 then ab.ccd = ab.ccd - 2000; now = tick() | |
711 | else break | |
712 | end end | |
713 | ||
714 | ab.ready = true | |
715 | end) | |
716 | end | |
717 | ||
718 | function attack() | |
719 | if combostep >= #bAttacks then combostep = 1 | |
720 | else combostep = combostep + 1 end | |
721 | ||
722 | combotime = tick(); bAttacks[combostep]() | |
723 | ||
724 | softoverride = false; lwoverride = false | |
725 | wsoverride = false; hume.WalkSpeed = defWS | |
726 | end | |
727 | ||
728 | function cast(num) | |
729 | local ab = abilities[num] | |
730 | local func = bAbilities[num] | |
731 | ||
732 | if ab.ready and func then | |
733 | cooldown(num); func() | |
734 | end end | |
735 | ||
736 | function knockback(targ, power, time) | |
737 | local vtors = targ:FindFirstChild("Torso") | |
738 | if vtors and vtors.Parent then | |
739 | local bv = i_n("BodyVelocity", vtors) | |
740 | bv.MaxForce = v3(math.huge,math.huge,math.huge) | |
741 | bv.Velocity = vtors.CFrame.lookVector * power | |
742 | game:GetService("Debris"):AddItem(bv, time) | |
743 | end end | |
744 | ||
745 | function checkStatus(targ, status) | |
746 | local val = targ:FindFirstChild(status) | |
747 | if val and val:IsA("BoolValue") then | |
748 | return true | |
749 | else return false | |
750 | end end | |
751 | ||
752 | function canMove() | |
753 | if checkStatus(char, "Stun") | |
754 | or checkStatus(char, "Knockback") | |
755 | then return true | |
756 | else return false | |
757 | end end | |
758 | ||
759 | -- Basic Attacks -- | |
760 | ||
761 | bAttacks = { | |
762 | ------------------ | |
763 | function() | |
764 | local t = math.ceil(15/atkspd.Value) | |
765 | local hitdb = {} | |
766 | ||
767 | for i = 1, t do swait() | |
768 | hw.C0 = hw.C0:lerp(stand.head * cfa(0, 0, math.rad(12)), i/t) | |
769 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, math.rad(24)), i/t) | |
770 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(0, .5, 0) * cfa(math.rad(15), 0, math.rad(172)), i/t) | |
771 | law.C0 = law.C0:lerp(stand.larm * cfa(0, math.rad(-30), math.rad(-70)), i/t) | |
772 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(-30), 0, 0), i/t) | |
773 | ||
774 | if not running then softoverride = true | |
775 | rlw.C0 = rlw.C0:lerp(stand.rleg, i/t) | |
776 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, math.rad(24), 0), i/t) | |
777 | end | |
778 | ||
779 | if not active or checkStatus(char, "Stun") then break end | |
780 | ||
781 | end | |
782 | ||
783 | if active then t = math.ceil(10/atkspd.Value); slash1:Play() | |
784 | ||
785 | for i = 1, t do swait() | |
786 | hw.C0 = hw.C0:lerp(stand.head * cfa(0, 0, math.rad(-12)), i/t) | |
787 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, math.rad(-24)), i/t) | |
788 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(.8, 0, -1) * cfa(math.rad(30), 0, math.rad(45)), i/t) | |
789 | law.C0 = law.C0:lerp(stand.larm * cfa(math.rad(-45), 0, math.rad(30)), i/t) | |
790 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(80), 0, 0), i/t) | |
791 | ||
792 | if not running then softoverride = true | |
793 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfn(.5, 0, 0) * cfa(0, math.rad(-24), 0), i/t) | |
794 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, 0, math.rad(15)), i/t) | |
795 | end | |
796 | ||
797 | for _,v in pairs(checkPartMag({weapon.Blade}, atkrange.Value)) do | |
798 | if not hitdb[v] then hitdb[v] = true | |
799 | strike(v, bdmg.Value, critc.Value) | |
800 | end end | |
801 | ||
802 | if not active or checkStatus(char, "Stun") then break end | |
803 | ||
804 | end end | |
805 | end, | |
806 | ------------------ | |
807 | function() | |
808 | local t = math.ceil(15/atkspd.Value) | |
809 | local hitdb = {} | |
810 | ||
811 | for i = 1, t do swait() | |
812 | hw.C0 = hw.C0:lerp(stand.head * cfa(0, 0, math.rad(-22)), i/t) | |
813 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, math.rad(-45)), i/t) | |
814 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(.8, 0, -1.8) * cfa(math.rad(-90), 0, math.rad(135)), i/t) | |
815 | law.C0 = law.C0:lerp(stand.larm * cfa(math.rad(-15), 0, math.rad(-30)), i/t) | |
816 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(-30), 0, 0), i/t) | |
817 | ||
818 | if not running then softoverride = true | |
819 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfn(.5, 0, 0), i/t) | |
820 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, 0, math.rad(30)), i/t) | |
821 | end | |
822 | ||
823 | if not active then break end | |
824 | end | |
825 | ||
826 | if active then t = math.ceil(10/atkspd.Value); slash2:Play() | |
827 | ||
828 | for i = 1, t do swait() | |
829 | hw.C0 = hw.C0:lerp(stand.head * cfa(0, 0, math.rad(15)), i/t) | |
830 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, math.rad(30)), i/t) | |
831 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(0, -.5, .5) * cfa(math.rad(-90), 0, 0), i/t) | |
832 | law.C0 = law.C0:lerp(stand.larm * cfn(0, 0, .2) * cfa(math.rad(-80), 0, math.rad(-15)), i/t) | |
833 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(90), 0, 0), i/t) | |
834 | ||
835 | if not running then softoverride = true | |
836 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfa(0, math.rad(-30), 0), i/t) | |
837 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, math.rad(30), 0), i/t) | |
838 | end | |
839 | ||
840 | for _,v in pairs(checkPartMag({weapon.Blade}, atkrange.Value)) do | |
841 | if not hitdb[v] then hitdb[v] = true | |
842 | strike(v, bdmg.Value, critc.Value) | |
843 | end end | |
844 | ||
845 | if not active then break end | |
846 | end end | |
847 | end, | |
848 | ------------------ | |
849 | function() | |
850 | local t = math.ceil(15/atkspd.Value) | |
851 | local hitdb = {} | |
852 | ||
853 | for i = 1, t do swait() | |
854 | hw.C0 = hw.C0:lerp(stand.head * cfa(0, 0, math.rad(60)), i/t) | |
855 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, math.rad(70)), i/t) | |
856 | raw.C0 = raw.C0:lerp(stand.rarm * cfa(math.rad(-30), math.rad(50), math.rad(-30)), i/t) | |
857 | law.C0 = law.C0:lerp(stand.larm * cfn(0, 0, -1.5) * cfa(math.rad(80), 0, math.rad(-30)), i/t) | |
858 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(-30), 0, 0), i/t) | |
859 | ||
860 | if not running then softoverride = true | |
861 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfa(0, 0, math.rad(-30)), i/t) | |
862 | llw.C0 = llw.C0:lerp(stand.lleg * cfn(-.8, 0, 0), i/t) | |
863 | end | |
864 | ||
865 | if not active then break end | |
866 | end | |
867 | ||
868 | if active then t = math.ceil(10/atkspd.Value); slash2:Play() | |
869 | ||
870 | for i = 1, t do swait() | |
871 | hw.C0 = hw.C0:lerp(stand.head, i/t) | |
872 | tw.C1 = tw.C1:lerp(stand.tors, i/t) | |
873 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(.8, 0, -.5) * cfa(0, 0, math.rad(90)), i/t) | |
874 | law.C0 = law.C0:lerp(stand.larm * cfn(-.8, 0, -1.6) * cfa(0, math.rad(-30), math.rad(-90)), i/t) | |
875 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(90), 0, 0), i/t) | |
876 | ||
877 | if not running then softoverride = true | |
878 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfn(.5, 0, 0), i/t) | |
879 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, 0, math.rad(30)), i/t) | |
880 | end | |
881 | ||
882 | for _,v in pairs(checkPartMag({weapon.Blade}, atkrange.Value)) do | |
883 | if not hitdb[v] then hitdb[v] = true | |
884 | strike(v, bdmg.Value, critc.Value) | |
885 | end end | |
886 | ||
887 | if not active then break end | |
888 | end end | |
889 | end, | |
890 | ------------------ | |
891 | function() | |
892 | local t = math.ceil(10/atkspd.Value) | |
893 | local hitdb = {} | |
894 | ||
895 | lwoverride = true | |
896 | wsoverride = true | |
897 | hume.WalkSpeed = 0 | |
898 | ||
899 | for i = 1, t do swait() | |
900 | hw.C0 = hw.C0:lerp(stand.head * cfa(0, 0, math.rad(-22)), i/t) | |
901 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, math.rad(-45)), i/t) | |
902 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(.8, 0, -1.8) * cfa(math.rad(-90), 0, math.rad(135)), i/t) | |
903 | law.C0 = law.C0:lerp(stand.larm * cfa(math.rad(-15), 0, math.rad(-30)), i/t) | |
904 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(-30), 0, 0), i/t) | |
905 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfn(1, 1, 0), i/t) | |
906 | llw.C0 = llw.C0:lerp(stand.lleg, i/t) | |
907 | ||
908 | if not active or checkStatus(char, "Stun") then break end | |
909 | ||
910 | end | |
911 | ||
912 | if active then t = math.ceil(40/atkspd.Value); slash3:Play() | |
913 | local angle = 0 | |
914 | ||
915 | for i = 1, t do swait() | |
916 | hw.C0 = hw.C0:lerp(stand.head * cfa(0, 0, math.rad(15)), i/t) | |
917 | tw.C1 = stand.tors * cfa(0, 0, math.rad(750 * (i/t))) | |
918 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(0, -.5, .5) * cfa(math.rad(-90), 0, 0), i/t) | |
919 | law.C0 = law.C0:lerp(stand.larm * cfn(0, 0, .2) * cfa(math.rad(-80), 0, math.rad(-15)), i/t) | |
920 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(90), 0, 0), i/t) | |
921 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfn(1, 1, 0), i/t) | |
922 | llw.C0 = llw.C0:lerp(stand.lleg, i/t) | |
923 | hrp.Velocity = hrp.CFrame.lookVector * 30 | |
924 | angle = angle + (750/t) | |
925 | ||
926 | if angle >= 330 and i~=t then slash3:Play(); angle = 0 | |
927 | end | |
928 | ||
929 | for _,v in pairs(checkPartMag({weapon.Blade}, atkrange.Value)) do | |
930 | if not hitdb[v] then hitdb[v] = true; strike(v, bdmg.Value, critc.Value) | |
931 | spawn(function() wait(.15); hitdb[v] = false end) | |
932 | end end | |
933 | ||
934 | if not active then break end | |
935 | end end | |
936 | end, | |
937 | ------------------ | |
938 | } | |
939 | ||
940 | -- Abilities -- | |
941 | ||
942 | bAbilities = { | |
943 | ||
944 | function(E) | |
945 | ||
946 | local t = 90 | |
947 | ||
948 | local b= i_n("BoolValue",char);b.Name="Blocking";game:GetService("Debris"):AddItem(b,1.65) | |
949 | defWS = 8 | |
950 | ||
951 | for i = 1, t do swait() | |
952 | hw.C0 = hw.C0:lerp(stand.head * cfa(math.rad(17),0,0), i/t) | |
953 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, 0), i/t) | |
954 | raw.C0 = raw.C0:lerp(stand.rarm * cfa(math.rad(-15),0,math.rad(90)), i/t) | |
955 | law.C0 = law.C0:lerp(stand.larm * cfn(-.3,-0.25,-1.95) * cfa(math.rad(45),math.rad(-40), math.rad(-80)), i/t) | |
956 | grip.C1 = grip.C1:lerp(stand.grip1 * cfn(0.25,0,0)* cfa(0,math.rad(90), math.rad(-110)), i/t) | |
957 | ||
958 | if not running then softoverride = true | |
959 | rlw.C0 = rlw.C0:lerp(stand.rleg, i/t) | |
960 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, math.rad(24), 0), i/t) | |
961 | end | |
962 | ||
963 | if not active or checkStatus(char, "Stun") then break end | |
964 | ||
965 | end | |
966 | defWS = ogdefWS | |
967 | ||
968 | end, | |
969 | ||
970 | function(Z) | |
971 | ||
972 | local t = 10 | |
973 | local hitdb = {} | |
974 | local exp = coroutine.wrap(function() | |
975 | local Explosion = newPart(i_n("Part"), "Effect", .2,.2,.2,BrickColor.new("Daisy orange"), 0.4, 0, true, false, workspace) | |
976 | local Mesh = i_n("SpecialMesh",Explosion);Mesh.Scale=v3(4,0.75,4);Mesh.MeshId="http://www.roblox.com/asset/?id=20329976" | |
977 | Explosion.CFrame = char.HumanoidRootPart.CFrame * cfn(0,-1.25,0)* cfa(math.rad(-180),0,0) | |
978 | repeat | |
979 | Mesh.Scale = Mesh.Scale + v3(.75,.175,.75) | |
980 | Explosion.Transparency = Explosion.Transparency + .05 | |
981 | swait() | |
982 | until Explosion.Transparency >= 1 | |
983 | Explosion:Destroy() | |
984 | end) | |
985 | ||
986 | for i = 1, t do swait() | |
987 | hw.C0 = hw.C0:lerp(stand.head * cfa(math.rad(-15),0,0), i/t) | |
988 | tw.C1 = tw.C1:lerp(stand.tors * cfn(0,-.1,0) * cfa(math.rad(-25),0,0), i/t) | |
989 | raw.C0 = raw.C0:lerp(stand.rarm * cfa(0, math.rad(21), math.rad(64)), i/t) | |
990 | law.C0 = law.C0:lerp(stand.larm * cfn(0,-.3,-1.45)* cfa(0, math.rad(-53), math.rad(-70)), i/t) | |
991 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(-180), 0, 0), i/t) | |
992 | ||
993 | if not running then softoverride = true | |
994 | rlw.C0 = rlw.C0:lerp(stand.rleg, i/t) | |
995 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, math.rad(24), 0), i/t) | |
996 | end | |
997 | ||
998 | if not active or checkStatus(char, "Stun") then break end | |
999 | ||
1000 | end | |
1001 | ||
1002 | local t = 25 | |
1003 | ||
1004 | defWS = 0 | |
1005 | lwoverride = true | |
1006 | wsoverride = true | |
1007 | skill1:Play() | |
1008 | exp() | |
1009 | local bv = i_n("BodyVelocity", char.HumanoidRootPart);bv.MaxForce=v3(math.huge,math.huge,math.huge);bv.Velocity=v3(0,95,0);game:GetService("Debris"):AddItem(bv,.075) | |
1010 | for i = 1, t do swait() | |
1011 | hw.C0 = hw.C0:lerp(stand.head * cfa(math.rad(-17),0,0), i/t) | |
1012 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, 0), i/t) | |
1013 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(0, .5, 0) * cfa(0, math.rad(23), math.rad(172)), i/t) | |
1014 | law.C0 = law.C0:lerp(stand.larm * cfn(0,0,-1.45)* cfa(0, math.rad(-53), math.rad(-143)), i/t) | |
1015 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(-180), 0, 0), i/t) | |
1016 | rlw.C0 = rlw.C0:lerp(stand.rleg, i/t) | |
1017 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, math.rad(24), 0), i/t) | |
1018 | ||
1019 | for _,v in pairs(checkPartMag({weapon.Blade}, 6)) do | |
1020 | if not hitdb[v] then hitdb[v] = true | |
1021 | strike(v, bdmg.Value + 5, 0) | |
1022 | if v.Name~=plr.Name then | |
1023 | local bv = i_n("BodyVelocity", v.Torso);bv.MaxForce=v3(math.huge,math.huge,math.huge);bv.Velocity=v3(0,85,0);game:GetService("Debris"):AddItem(bv,.1) | |
1024 | end end end | |
1025 | ||
1026 | if not active or checkStatus(char, "Stun") then break end | |
1027 | ||
1028 | end | |
1029 | ||
1030 | defWS = ogdefWS | |
1031 | end, | |
1032 | ||
1033 | function(X) | |
1034 | ||
1035 | local t = 15 | |
1036 | local hitdb = {} | |
1037 | lwoverride = true | |
1038 | wsoverride = true | |
1039 | defWS = 0 | |
1040 | ||
1041 | local exp = coroutine.wrap(function() | |
1042 | local Explosion = newPart(i_n("Part"), "Effect", .2,.2,.2,BrickColor.new("Ghost grey"), .4, 0, true, false, workspace) | |
1043 | local Mesh = i_n("SpecialMesh",Explosion);Mesh.Scale=v3(3,4,3);Mesh.MeshId="http://www.roblox.com/asset/?id=20329976" | |
1044 | Explosion.CFrame = char.HumanoidRootPart.CFrame * cfa(math.rad(45),0,0) | |
1045 | local bv = i_n("BodyVelocity", hrp); bv.MaxForce = v3(math.huge,math.huge,math.huge);bv.Velocity = hrp.CFrame.lookVector * 60 | |
1046 | game:GetService("Debris"):AddItem(bv,.15) | |
1047 | repeat | |
1048 | Mesh.Scale = Mesh.Scale + v3(.75,.25,.75) | |
1049 | Explosion.Transparency = Explosion.Transparency + .05 | |
1050 | swait() | |
1051 | until Explosion.Transparency >= 1 | |
1052 | Explosion:Destroy() | |
1053 | end) | |
1054 | ||
1055 | exp() | |
1056 | skill2:Play() | |
1057 | for i = 1, t do swait() | |
1058 | hw.C0 = hw.C0:lerp(stand.head * cfa(0, math.rad(-10), math.rad(-90)), i/t) | |
1059 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, math.rad(-90)), i/t) | |
1060 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(0,-0.35,0.45)* cfa(math.rad(-90),0,math.rad(90)), i/t) | |
1061 | law.C0 = law.C0:lerp(stand.larm * cfa(math.rad(-45),0,0), i/t) | |
1062 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(-12),0,0), i/t) | |
1063 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfa(math.rad(12),0,0), i/t) | |
1064 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(math.rad(-18),0,0), i/t) | |
1065 | ||
1066 | --[[if not running then softoverride = true | |
1067 | rlw.C0 = rlw.C0:lerp(stand.rleg, i/t) | |
1068 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, math.rad(24), 0), i/t) | |
1069 | end | |
1070 | --]] | |
1071 | for _,v in pairs(checkPartMag({weapon.Pommel}, 3)) do | |
1072 | if not hitdb[v] then hitdb[v] = true | |
1073 | strike(v, bdmg.Value + 1.5, 0) | |
1074 | if v.Name~=plr.Name then | |
1075 | local bv =i_n("BoolValue", v);bv.Name = "ArmorBroken";game:GetService("Debris"):AddItem(bv,2) | |
1076 | end | |
1077 | end end | |
1078 | ||
1079 | if not active or checkStatus(char, "Stun") then break end | |
1080 | ||
1081 | end | |
1082 | defWS = ogdefWS | |
1083 | end, | |
1084 | ||
1085 | function(C) | |
1086 | ||
1087 | local t = 20 | |
1088 | local hitdb = {} | |
1089 | local exp = coroutine.wrap(function() | |
1090 | local Explosion = newPart(i_n("Part"), "Effect", .2,.2,.2,BrickColor.new("Bright red"), 0, 0, true, false, workspace) | |
1091 | local Mesh = i_n("SpecialMesh",Explosion);Mesh.Scale=v3(3,4,3);Mesh.MeshId="http://www.roblox.com/asset/?id=20329976" | |
1092 | Explosion.CFrame = char.HumanoidRootPart.CFrame * cfn(0,-1.25,0)* cfa(0,0,0) | |
1093 | repeat | |
1094 | Mesh.Scale = Mesh.Scale + v3(.75,.25,.75) | |
1095 | Explosion.Transparency = Explosion.Transparency + .05 | |
1096 | swait() | |
1097 | until Explosion.Transparency >= 1 | |
1098 | Explosion:Destroy() | |
1099 | end) | |
1100 | ||
1101 | local atkspdbuf = coroutine.wrap(function() | |
1102 | atkspd.Value = atkspd.Value * 25^25*25 | |
1103 | critc.Value = critc.Value + 20 | |
1104 | local cln = script.rage:Clone() | |
1105 | cln.Parent = char.Torso | |
1106 | cln.Enabled = true | |
1107 | local cln2 = script.ragelight:Clone() | |
1108 | cln2.Parent = char.Torso | |
1109 | cln2.Enabled = true | |
1110 | defWS = defWS * 1.45 | |
1111 | wait(5.85) | |
1112 | cln.Enabled = false | |
1113 | wait(.15) | |
1114 | cln:Destroy() | |
1115 | cln2:Destroy() | |
1116 | defWS = ogdefWS | |
1117 | atkspd.Value = atkspd.Value / 1.1 | |
1118 | critc.Value = critc.Value - 1 | |
1119 | end) | |
1120 | ||
1121 | for i = 1, t do swait() | |
1122 | hw.C0 = hw.C0:lerp(stand.head * cfa(math.rad(12), 0, 0), i/t) | |
1123 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, 0), i/t) | |
1124 | raw.C0 = raw.C0:lerp(stand.rarm * cfa(math.rad(30),math.rad(45),math.rad(90)), i/t) | |
1125 | law.C0 = law.C0:lerp(stand.larm * cfa(math.rad(30),math.rad(-45),math.rad(-90)), i/t) | |
1126 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(0,0,0), i/t) | |
1127 | ||
1128 | if not running then softoverride = true | |
1129 | rlw.C0 = rlw.C0:lerp(stand.rleg, i/t) | |
1130 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, math.rad(24), 0), i/t) | |
1131 | end | |
1132 | ||
1133 | if not active or checkStatus(char, "Stun") then break end | |
1134 | ||
1135 | end | |
1136 | ||
1137 | if active then skill3:Play();exp();atkspdbuf() | |
1138 | ||
1139 | for i = 1, t do swait() | |
1140 | hw.C0 = hw.C0:lerp(stand.head * cfa(math.rad(-2), 0, 0), i/t) | |
1141 | tw.C1 = tw.C1:lerp(stand.tors * cfa(0, 0, 0), i/t) | |
1142 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(-0.5,-0.5,0) * cfa(math.rad(30),math.rad(45),math.rad(120)), i/t) | |
1143 | law.C0 = law.C0:lerp(stand.larm * cfn(0.5,-0.5,0) * cfa(math.rad(30),math.rad(-45),math.rad(-120)), i/t) | |
1144 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(0,0,0), i/t) | |
1145 | ||
1146 | if not running then softoverride = true | |
1147 | rlw.C0 = rlw.C0:lerp(stand.rleg, i/t) | |
1148 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, math.rad(24), 0), i/t) | |
1149 | end | |
1150 | ||
1151 | if not active or checkStatus(char, "Stun") then break end | |
1152 | ||
1153 | end | |
1154 | ||
1155 | ||
1156 | end | |
1157 | end, | |
1158 | ||
1159 | function(V) | |
1160 | ||
1161 | lwoverride = true | |
1162 | wsoverride = true | |
1163 | defWS = 0 | |
1164 | local t = 120 | |
1165 | local hitdb = {} | |
1166 | ||
1167 | local Trail = newPart(i_n("Part"), "Effect", .2,.2,.2,BrickColor.new("Institutional white"), 1, 0, true, false, workspace);game:GetService("Debris"):AddItem(Trail,3) | |
1168 | ||
1169 | local emitr = script.Electricity:Clone();emitr.Parent = weapon.Blade; emitr.Enabled = true; game:GetService("Debris"):AddItem(emitr,1.95) | |
1170 | local bladtrail = coroutine.wrap(function() | |
1171 | Trail.Material = "Neon" | |
1172 | Trail.Size = v3(25, 0.5, 0.5) | |
1173 | Trail.Transparency = 0 | |
1174 | local Mesh = i_n("SpecialMesh",Trail);Mesh.Scale=v3(1,1,1);Mesh.MeshType = "Sphere" | |
1175 | Trail.CFrame = char.HumanoidRootPart.CFrame * cfn(0,0,0)* cfa(0,math.rad(90),0) | |
1176 | local dumbtp = newPart(i_n("Part"), "Effect", .2,.2,.2,BrickColor.new("Institutional white"), 1, 0, true, false, workspace);game:GetService("Debris"):AddItem(dumbtp,.1) | |
1177 | dumbtp.CFrame = char.HumanoidRootPart.CFrame *cfn(0,0,-15) | |
1178 | char.HumanoidRootPart.CFrame = dumbtp.CFrame | |
1179 | repeat | |
1180 | Trail.Size = Trail.Size + v3(.125,.025,.025) | |
1181 | Trail.Transparency = Trail.Transparency + .025 | |
1182 | swait() | |
1183 | until Trail.Transparency >= 1 | |
1184 | Trail:Destroy() | |
1185 | end) | |
1186 | skill4:Play() | |
1187 | for i = 1, t do swait() | |
1188 | hw.C0 = hw.C0:lerp(stand.head * cfa(math.rad(-22), 0, 0), i/t) | |
1189 | tw.C1 = tw.C1:lerp(stand.tors * cfn(0,0,0.65) *cfa(math.rad(-25), 0, 0), i/t) | |
1190 | raw.C0 = raw.C0:lerp(stand.rarm * cfa(math.rad(-85),0,math.rad(36)), i/t) | |
1191 | law.C0 = law.C0:lerp(stand.larm * cfn(-0.25,0.5,-1.85) *cfa(math.rad(90), 0, math.rad(-30)), i/t) | |
1192 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(30), 0, math.rad(20)), i/t) | |
1193 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfn(.85, 1, 0) * cfa(0,0,math.rad(30)), i/t) | |
1194 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0,0,math.rad(15)), i/t) | |
1195 | ||
1196 | if not active or checkStatus(char, "Stun") then break end | |
1197 | ||
1198 | end | |
1199 | ||
1200 | local t = 15 | |
1201 | bladtrail() | |
1202 | skill42:Play() | |
1203 | ||
1204 | for i = 1, t do swait() | |
1205 | hw.C0 = hw.C0:lerp(stand.head, i/t) | |
1206 | tw.C1 = tw.C1:lerp(stand.tors, i/t) | |
1207 | raw.C0 = raw.C0:lerp(stand.rarm * cfn(.8, 0, -.5) * cfa(0, 0, math.rad(90)), i/t) | |
1208 | law.C0 = law.C0:lerp(stand.larm * cfn(-.8, 0, -1.6) * cfa(0, math.rad(-30), math.rad(-90)), i/t) | |
1209 | grip.C1 = grip.C1:lerp(stand.grip1 * cfa(math.rad(90), 0, 0), i/t) | |
1210 | ||
1211 | if not running then softoverride = true | |
1212 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfn(.5, 0, 0), i/t) | |
1213 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, 0, math.rad(30)), i/t) | |
1214 | end | |
1215 | ||
1216 | for _,v in pairs(checkPartMag({Trail}, 20)) do | |
1217 | if not hitdb[v] then hitdb[v] = true | |
1218 | strike(v, bdmg.Value + 10, 0) | |
1219 | end end | |
1220 | ||
1221 | ||
1222 | if not active or checkStatus(char, "Stun") then break end | |
1223 | ||
1224 | end | |
1225 | ||
1226 | defWS = ogdefWS | |
1227 | end | |
1228 | ||
1229 | } | |
1230 | ||
1231 | -- coroutines | |
1232 | ---------------------------------------------- | |
1233 | ||
1234 | ---------------------------------------------- | |
1235 | local runmanage = spawn(function() | |
1236 | while true do swait() | |
1237 | ||
1238 | local tvel = (hrp.Velocity * v3(1, 0, 1)).magnitude | |
1239 | local groundcheck = Ray.new(hrp.Position, ((hrp.CFrame.p - Vector3.new(0, 1, 0)) - hrp.CFrame.p).unit * 4) | |
1240 | local hit = workspace:FindPartOnRay(groundcheck, char) | |
1241 | ||
1242 | if hit then | |
1243 | if jumping then jumping = false; end | |
1244 | else jumping = true | |
1245 | end | |
1246 | ||
1247 | if tvel > 2 then | |
1248 | ||
1249 | if not running then running = true; softoverride = false end | |
1250 | elseif running then running = false | |
1251 | end | |
1252 | ||
1253 | if (wsoverride or lwoverride) and not active then | |
1254 | wsoverride = false; lwoverride = false | |
1255 | end | |
1256 | ||
1257 | if not wsoverride then | |
1258 | hume.WalkSpeed = defWS | |
1259 | end end end) | |
1260 | ---------------------------------------------- | |
1261 | local runanim = spawn(function() | |
1262 | while true do swait() | |
1263 | local vtvel = math.abs(hrp.Velocity.Y) | |
1264 | local t = 20 | |
1265 | ||
1266 | if equipped and not active then | |
1267 | ||
1268 | if jumping then | |
1269 | ||
1270 | if hrp.Velocity.Y > 1 then for i = 1, t do swait() | |
1271 | raw.C0 = raw.C0:lerp(jump.rarm, (i/t)/2) | |
1272 | law.C0 = law.C0:lerp(jump.larm, (i/t)/2) | |
1273 | hw.C0 = hw.C0:lerp(jump.head, (i/t)/2) | |
1274 | tw.C1 = tw.C1:lerp(jump.tors, (i/t)/2) | |
1275 | grip.C1 = grip.C1:lerp(jump.grip1, (i/t)/2) | |
1276 | grip.C0 = grip.C0:lerp(jump.grip0, (i/t)/2) | |
1277 | if not jumping or active or hrp.Velocity.Y < 1 then | |
1278 | break end end | |
1279 | ||
1280 | else for i = 1, t do swait() | |
1281 | raw.C0 = raw.C0:lerp(fall.rarm, (i/t)/2) | |
1282 | law.C0 = law.C0:lerp(fall.larm, (i/t)/2) | |
1283 | hw.C0 = hw.C0:lerp(fall.head, (i/t)/2) | |
1284 | tw.C1 = tw.C1:lerp(fall.tors, (i/t)/2) | |
1285 | grip.C1 = grip.C1:lerp(fall.grip1, (i/t)/2) | |
1286 | grip.C0 = grip.C0:lerp(fall.grip0, (i/t)/2) | |
1287 | if not jumping or active or hrp.Velocity.Y > 1 then | |
1288 | break end end end | |
1289 | ||
1290 | elseif running then for i = 1, t do swait() | |
1291 | raw.C0 = raw.C0:lerp(run.rarm, (i/t)/2) | |
1292 | law.C0 = law.C0:lerp(stand.larm * cfa(math.rad(-15), math.rad(10), 0), (i/t)/2) | |
1293 | hw.C0 = hw.C0:lerp(run.head, (i/t)/2) | |
1294 | tw.C1 = tw.C1:lerp(run.tors, (i/t)/2) | |
1295 | grip.C1 = grip.C1:lerp(run.grip1, (i/t)/2) | |
1296 | grip.C0 = grip.C0:lerp(run.grip0, (i/t)/2) | |
1297 | if not running or jumping or active then break end | |
1298 | end | |
1299 | ||
1300 | for i = 1, t do swait() | |
1301 | raw.C0 = raw.C0:lerp(run.rarm, (i/t)/2) | |
1302 | law.C0 = law.C0:lerp(stand.larm * cfa(math.rad(-15), math.rad(10),0), (i/t)/2) | |
1303 | hw.C0 = hw.C0:lerp(run.head, (i/t)/2) | |
1304 | tw.C1 = tw.C1:lerp(run.tors, (i/t)/2) | |
1305 | grip.C1 = grip.C1:lerp(run.grip1, (i/t)/2) | |
1306 | grip.C0 = grip.C0:lerp(run.grip0, (i/t)/2) | |
1307 | if not running or jumping or active then break end | |
1308 | end | |
1309 | ||
1310 | else t = 60 | |
1311 | for i = 1, t do swait() | |
1312 | raw.C0 = raw.C0:lerp(neutral.rarm, i/t) | |
1313 | law.C0 = law.C0:lerp(neutral.larm, i/t) | |
1314 | hw.C0 = hw.C0:lerp(neutral.head, i/t) | |
1315 | tw.C1 = tw.C1:lerp(neutral.tors, i/t) | |
1316 | grip.C1 = grip.C1:lerp(neutral.grip1, (i/t)/2) | |
1317 | grip.C0 = grip.C0:lerp(neutral.grip0, (i/t)/2) | |
1318 | if running or jumping or active then break end | |
1319 | end end end end end) | |
1320 | ---------------------------------------------- | |
1321 | local legwalk = spawn(function() | |
1322 | while true do swait() | |
1323 | local t = math.ceil(300/hume.WalkSpeed) | |
1324 | local t2 = 20 | |
1325 | ||
1326 | if equipped and not (lwoverride or softoverride) then | |
1327 | ||
1328 | if jumping then | |
1329 | ||
1330 | if hrp.Velocity.Y > 1 then for i = 1, t2 do swait() | |
1331 | rlw.C0 = rlw.C0:lerp(jump.rleg, i/t2) | |
1332 | llw.C0 = llw.C0:lerp(jump.lleg, i/t2) | |
1333 | if not jumping or lwoverride or softoverride | |
1334 | or hrp.Velocity.Y < 1 then break end | |
1335 | end | |
1336 | ||
1337 | else for i = 1, t2 do swait() | |
1338 | rlw.C0 = rlw.C0:lerp(fall.rleg, i/t2) | |
1339 | llw.C0 = llw.C0:lerp(fall.lleg, i/t2) | |
1340 | if not jumping or lwoverride or softoverride | |
1341 | or hrp.Velocity.Y > 1 then break end | |
1342 | end end | |
1343 | ||
1344 | elseif running then for i = 1, t do swait() | |
1345 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfa(0, 0, math.rad(-40)), (i/t)/2) | |
1346 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, 0, math.rad(-40)), (i/t)/2) | |
1347 | if not running or jumping or lwoverride or softoverride then break end | |
1348 | end | |
1349 | ||
1350 | if running and not jumping then for i = 1, t do swait() | |
1351 | rlw.C0 = rlw.C0:lerp(stand.rleg * cfa(0, 0, math.rad(40)), (i/t)/2) | |
1352 | llw.C0 = llw.C0:lerp(stand.lleg * cfa(0, 0, math.rad(40)), (i/t)/2) | |
1353 | if not running or lwoverride or softoverride then break end | |
1354 | end end | |
1355 | ||
1356 | else for i = 1, t do swait() | |
1357 | rlw.C0 = rlw.C0:lerp(neutral.rleg, i/t) | |
1358 | llw.C0 = llw.C0:lerp(neutral.lleg, i/t) | |
1359 | if running or jumping or lwoverride or softoverride then break end | |
1360 | end end | |
1361 | ||
1362 | elseif not equipped then | |
1363 | rlw.C0 = stand.rleg; llw.C0 = stand.lleg | |
1364 | end end end) | |
1365 | ---------------------------------------------- | |
1366 | local combomanage = spawn(function() | |
1367 | while true do swait() | |
1368 | if (tick()-combotime)>=combowait | |
1369 | and not active then combostep = 0 | |
1370 | end end | |
1371 | end) | |
1372 | ---------------------------------------------- | |
1373 | -- Input Events | |
1374 | ||
1375 | mouse.Button1Down:connect(function() | |
1376 | if equipped and not active then active = true | |
1377 | attack(); active = false | |
1378 | end end) | |
1379 | ||
1380 | mouse.KeyDown:connect(function(key) | |
1381 | key = key:lower() | |
1382 | ||
1383 | for i,v in ipairs(abilities) do | |
1384 | if key == v.key:lower() then | |
1385 | if equipped and script.CanCastAbilities.Value == true and not active then | |
1386 | active = true; cast(i); active = false | |
1387 | end end end | |
1388 | ||
1389 | if key == "q" then | |
1390 | if not equipped then equipped = true; active = true | |
1391 | equip(); active = false | |
1392 | ||
1393 | else if not active then active = true | |
1394 | unequip(); active = false; equipped = false | |
1395 | end end end end) | |
1396 | ||
1397 | -- Arbitrary End Code -- | |
1398 | weapon.Parent = char | |
1399 | ||
1400 | while char:FindFirstChild("Silenced") ~= nil do | |
1401 | script.CanCastAbilities.Value = false | |
1402 | wait(2) | |
1403 | script.CanCastAbilities.Value = true | |
1404 | end | |
1405 | ||
1406 | while true do -- stun | |
1407 | if char:FindFirstChild("Stunned") ~= nil then do | |
1408 | defWS = 0; hume.JumpPower = 0 ;active = true | |
1409 | local stuntext = coroutine.wrap(function() | |
1410 | local p=Instance.new("Part",workspace);p.CanCollide=false;p.Transparency=1;p.Size=Vector3.new(.2,.2,.2);p.CFrame=char.Torso.CFrame+Vector3.new(math.random(-1,1),math.random(1,2),math.random(-1,1));p.Anchored = true | |
1411 | local g=Instance.new("BillboardGui",p);g.Size=UDim2.new(2.5,0,2.5,0);g.Adornee=p;g.AlwaysOnTop=true | |
1412 | local t=Instance.new("TextLabel",g);t.BackgroundTransparency=1;t.TextStrokeTransparency=0;t.Size=UDim2.new(1,0,1,0);t.TextScaled=true;t.Font= Enum.Font.Fantasy | |
1413 | t:TweenPosition(UDim2.new(0,0,-1,0),'Out','Sine',1.25) | |
1414 | t.Text = "Stunned!" | |
1415 | t.TextColor3=c3(255,255,0) | |
1416 | t.TextStrokeColor3=BrickColor.new("Really black").Color | |
1417 | local s=Instance.new("Sound", char.Torso) | |
1418 | s.SoundId="rbxassetid://2801263" | |
1419 | s.Volume = 1 | |
1420 | s.Pitch = 1.15 | |
1421 | s:Play() | |
1422 | game:GetService("Debris"):AddItem(s,1) | |
1423 | game:GetService("Debris"):AddItem(p,1.45) | |
1424 | spawn(function() for i = 0,1,.1 do t.TextTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
1425 | end) | |
1426 | stuntext() | |
1427 | local t = 110 | |
1428 | for i = 1, t do swait() | |
1429 | hw.C0 = hw.C0:lerp(stunned.head, i/t) | |
1430 | tw.C1 = tw.C1:lerp(stunned.tors , i/t) | |
1431 | raw.C0 = raw.C0:lerp(stunned.rarm , i/t) | |
1432 | law.C0 = law.C0:lerp(stunned.larm , i/t) | |
1433 | grip.C1 = grip.C1:lerp(stunned.grip1 , i/t) | |
1434 | ||
1435 | if not running then softoverride = true | |
1436 | rlw.C0 = rlw.C0:lerp(stunned.rleg, i/t) | |
1437 | llw.C0 = llw.C0:lerp(stunned.lleg, i/t) | |
1438 | if not active then break end | |
1439 | end | |
1440 | ||
1441 | end | |
1442 | defWS = ogdefWS; hume.JumpPower = 50 ;active = false | |
1443 | end | |
1444 | end | |
1445 | if char:FindFirstChild("Silenced") ~= nil then do | |
1446 | script.CanCastAbilities.Value = false | |
1447 | local siltext = coroutine.wrap(function() | |
1448 | local p=Instance.new("Part",workspace);p.CanCollide=false;p.Transparency=1;p.Size=Vector3.new(.2,.2,.2);p.CFrame=char.Torso.CFrame+Vector3.new(math.random(-1,1),math.random(1,2),math.random(-1,1));p.Anchored = true | |
1449 | local g=Instance.new("BillboardGui",p);g.Size=UDim2.new(2.5,0,2.5,0);g.Adornee=p;g.AlwaysOnTop=true | |
1450 | local t=Instance.new("TextLabel",g);t.BackgroundTransparency=1;t.TextStrokeTransparency=0;t.Size=UDim2.new(1,0,1,0);t.TextScaled=true;t.Font= Enum.Font.Fantasy | |
1451 | t:TweenPosition(UDim2.new(0,0,-1,0),'Out','Sine',1.25) | |
1452 | t.Text = "Silenced" | |
1453 | t.TextColor3=BrickColor.new("Eggplant").Color | |
1454 | t.TextStrokeColor3=BrickColor.new("Really black").Color | |
1455 | local s=Instance.new("Sound", char.Torso) | |
1456 | s.SoundId="rbxassetid://2785493" | |
1457 | s.Volume = 1 | |
1458 | s.Pitch = 1.2 | |
1459 | s:Play() | |
1460 | game:GetService("Debris"):AddItem(s,1) | |
1461 | game:GetService("Debris"):AddItem(p,1.45) | |
1462 | spawn(function() for i = 0,1,.1 do t.TextTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
1463 | end) | |
1464 | siltext() | |
1465 | wait(2.15) | |
1466 | script.CanCastAbilities.Value = true | |
1467 | end end | |
1468 | if char:FindFirstChild("Slowed") ~= nil then do | |
1469 | defWS = defWS - 7 | |
1470 | local siltext = coroutine.wrap(function() | |
1471 | local p=Instance.new("Part",workspace);p.CanCollide=false;p.Transparency=1;p.Size=Vector3.new(.2,.2,.2);p.CFrame=char.Torso.CFrame+Vector3.new(math.random(-1,1),math.random(1,2),math.random(-1,1));p.Anchored = true | |
1472 | local g=Instance.new("BillboardGui",p);g.Size=UDim2.new(2.5,0,2.5,0);g.Adornee=p;g.AlwaysOnTop=true | |
1473 | local t=Instance.new("TextLabel",g);t.BackgroundTransparency=1;t.TextStrokeTransparency=0;t.Size=UDim2.new(1,0,1,0);t.TextScaled=true;t.Font= Enum.Font.Fantasy | |
1474 | t:TweenPosition(UDim2.new(0,0,-1,0),'Out','Sine',1.25) | |
1475 | t.Text = "Slowed" | |
1476 | t.TextColor3=BrickColor.new("Ghost grey").Color | |
1477 | t.TextStrokeColor3=BrickColor.new("Really black").Color | |
1478 | local s=Instance.new("Sound", char.Torso) | |
1479 | s.SoundId="rbxassetid://2785493" | |
1480 | s.Volume = 1 | |
1481 | s.Pitch = .8 | |
1482 | s:Play() | |
1483 | game:GetService("Debris"):AddItem(s,1) | |
1484 | game:GetService("Debris"):AddItem(p,1.45) | |
1485 | spawn(function() for i = 0,1,.1 do t.TextTransparency=i;t.TextStrokeTransparency=i;wait(.1);end end) | |
1486 | end) | |
1487 | siltext() | |
1488 | wait(2.15) | |
1489 | defWS = defWS + 7 | |
1490 | end end | |
1491 | swait() | |
1492 | end | |
1493 | ||
1494 | ||
1495 | -- script made by Huge_Nazo | |
1496 | -- gime credit if u use this idc if u do just at least when u go to show say someone cool made it |