SHOW:
|
|
- or go back to the newest paste.
1 | Player = game:GetService("Players").LocalPlayer | |
2 | Character = Player.Character | |
3 | PlayerGui = Player.PlayerGui | |
4 | Backpack = Player.Backpack | |
5 | Torso = Character.Torso | |
6 | Head = Character.Head | |
7 | Humanoid = Character.Humanoid | |
8 | RootPart = Character.HumanoidRootPart | |
9 | RootJoint = RootPart.RootJoint | |
10 | LeftArm = Character["Left Arm"] | |
11 | LeftLeg = Character["Left Leg"] | |
12 | RightArm = Character["Right Arm"] | |
13 | RightLeg = Character["Right Leg"] | |
14 | LS = Torso["Left Shoulder"] | |
15 | LH = Torso["Left Hip"] | |
16 | RS = Torso["Right Shoulder"] | |
17 | RH = Torso["Right Hip"] | |
18 | Face = Head.face | |
19 | Neck = Torso.Neck | |
20 | it = Instance.new | |
21 | vt = Vector3.new | |
22 | cf = CFrame.new | |
23 | rad = math.rad | |
24 | euler = CFrame.fromEulerAnglesXYZ | |
25 | angles = CFrame.Angles | |
26 | Mouse = Player:GetMouse() | |
27 | coroutine.resume(coroutine.create(function() | |
28 | game.StarterGui:SetCore("ChatMakeSystemMessage", { | |
29 | Text = "Fixed by PixelFir3 / Cortana#8155"; | |
30 | Color = Color3.new(0, 1, 1); | |
31 | Font = Enum.Font.Code; | |
32 | FontSize = Enum.FontSize.Size24; | |
33 | }) | |
34 | end)) | |
35 | ArtificialHB = Instance.new("BindableEvent", script) | |
36 | ArtificialHB.Name = "ArtificialHB" | |
37 | script:WaitForChild("ArtificialHB") | |
38 | frame = 0.016666666666667 | |
39 | tf = 0 | |
40 | allowframeloss = false | |
41 | tossremainder = false | |
42 | lastframe = tick() | |
43 | script.ArtificialHB:Fire() | |
44 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
45 | ||
46 | tf = tf + s | |
47 | if frame <= tf then | |
48 | if allowframeloss then | |
49 | script.ArtificialHB:Fire() | |
50 | lastframe = tick() | |
51 | else | |
52 | for i = 1, math.floor(tf / frame) do | |
53 | script.ArtificialHB:Fire() | |
54 | end | |
55 | lastframe = tick() | |
56 | end | |
57 | if tossremainder then | |
58 | tf = 0 | |
59 | else | |
60 | tf = tf - frame * math.floor(tf / frame) | |
61 | end | |
62 | end | |
63 | end | |
64 | ) | |
65 | local animationspeed = 2 | |
66 | hbwait = function(number) | |
67 | ||
68 | if number == 0 or number == nil then | |
69 | ArtificialHB.Event:wait() | |
70 | else | |
71 | for i = 0, number do | |
72 | ArtificialHB.Event:wait() | |
73 | z = Instance.new("Sound", char.Torso) | |
74 | z.SoundId = "rbxassetid://988950574 " | |
75 | z.Looped = true | |
76 | z.Pitch = 1000000 | |
77 | z.Volume = 0.3 | |
78 | end | |
79 | end | |
80 | end | |
81 | ||
82 | local Stats = Instance.new("Folder", Character) | |
83 | Stats.Name = "Stats" | |
84 | local Defense = Instance.new("NumberValue", Stats) | |
85 | Defense.Name = "Defense" | |
86 | Defense.Value = 0.1 | |
87 | local Movement = Instance.new("NumberValue", Stats) | |
88 | Movement.Name = "Movement" | |
89 | Movement.Value = 0.35 | |
90 | local Damage = Instance.new("NumberValue", Stats) | |
91 | Damage.Name = "Damage" | |
92 | Damage.Value = 0 | |
93 | local Mana = Instance.new("NumberValue", Stats) | |
94 | Mana.Name = "Mana" | |
95 | Mana.Value = 0 | |
96 | local Rooted = Instance.new("BoolValue", Stats) | |
97 | Rooted.Name = "Rooted" | |
98 | Rooted.Value = false | |
99 | local BlockValue = Instance.new("BoolValue", Stats) | |
100 | BlockValue.Name = "BlockValue" | |
101 | BlockValue.Value = false | |
102 | local StaggerHitAnim = Instance.new("BoolValue", Stats) | |
103 | StaggerHitAnim.Name = "StaggerHitAnim" | |
104 | StaggerHitAnim.Value = false | |
105 | local StaggerAnim = Instance.new("BoolValue", Stats) | |
106 | StaggerAnim.Name = "StaggerAnim" | |
107 | StaggerAnim.Value = false | |
108 | local StunAnim = Instance.new("BoolValue", Stats) | |
109 | StunAnim.Name = "StunAnim" | |
110 | StunAnim.Value = false | |
111 | local StunValue = Instance.new("NumberValue", Stats) | |
112 | StunValue.Name = "StunValue" | |
113 | StunValue.Value = 0 | |
114 | local CanCrit = Instance.new("BoolValue", Stats) | |
115 | CanCrit.Name = "CanCrit" | |
116 | CanCrit.Value = false | |
117 | local CritChance = Instance.new("NumberValue", Stats) | |
118 | CritChance.Name = "CritChance" | |
119 | CritChance.Value = 20 | |
120 | local CanPenetrateArmor = Instance.new("BoolValue", Stats) | |
121 | CanPenetrateArmor.Name = "CanPenetrateArmor" | |
122 | CanPenetrateArmor.Value = false | |
123 | local AntiTeamKill = Instance.new("BoolValue", Stats) | |
124 | AntiTeamKill.Name = "AntiTeamKill" | |
125 | AntiTeamKill.Value = false | |
126 | necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
127 | RootCF = angles(rad(-90), 0, rad(180)) | |
128 | local idle = 0 | |
129 | local Anim = "Idle" | |
130 | local animtype = math.floor(math.random(1, 3)) | |
131 | local attacktype = 1 | |
132 | local attack = false | |
133 | local equipped = false | |
134 | local LastPoint = nil | |
135 | local staggerhitanim = false | |
136 | local staggeranim = false | |
137 | local stunanim = false | |
138 | local CritChanceNumber = 0 | |
139 | local idlen = 0 | |
140 | local donum = 0 | |
141 | local sine = 0 | |
142 | local change = 2 / animationspeed | |
143 | local walkinganim = false | |
144 | local handidle = false | |
145 | local walk = 0 | |
146 | local stundelay = 0 | |
147 | local manadelay = 0 | |
148 | local robloxidleanimation = Instance.new("Animation", Torso) | |
149 | robloxidleanimation.Name = "robloxidleanimation" | |
150 | robloxidleanimation.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
151 | local Animator = Humanoid:FindFirstChild("Animator") | |
152 | local Animate = Character:FindFirstChild("Animate") | |
153 | local HitPlayerSounds = {199149137, 199149186, 199149221, 199149235, 199149269, 199149297} | |
154 | local HitArmorSounds = {199149321, 199149338, 199149367, 199149409, 199149452} | |
155 | local HitWeaponSounds = {199148971, 199149025, 199149072, 199149109, 199149119} | |
156 | local HitBlockSounds = {199148933, 199148947} | |
157 | local cooldown1 = 0 | |
158 | local cooldown2 = 0 | |
159 | local cooldown3 = 0 | |
160 | local cooldown4 = 0 | |
161 | local scrn = Instance.new("ScreenGui", PlayerGui) | |
162 | local ud = UDim2.new | |
163 | local c3 = Color3.new | |
164 | local skillcolorscheme = c3(1, 1, 1) | |
165 | subtractmana = function(k) | |
166 | ||
167 | if k <= Mana.Value then | |
168 | Mana.Value = Mana.Value - k | |
169 | end | |
170 | end | |
171 | ||
172 | local co1 = 0 | |
173 | local co2 = 0 | |
174 | local co3 = 0 | |
175 | local co4 = 0 | |
176 | local maxmana = 0 | |
177 | local maxstun = 1 | |
178 | local recovermana = 0 | |
179 | local losestun = 0 | |
180 | local stunwait = 0 | |
181 | local manawait = 0 | |
182 | local skill1mana = 0 | |
183 | local skill2mana = 0 | |
184 | local skill3mana = 0 | |
185 | local skill4mana = 0 | |
186 | local menuupdatespeed = 0 | |
187 | local constantupdate = false | |
188 | local showstats = false | |
189 | local allowstunbar = false | |
190 | local CustomColor = Torso.BrickColor | |
191 | local Colorpart1 = CustomColor.r | |
192 | local Colorpart2 = CustomColor.g | |
193 | local Colorpart3 = CustomColor.b | |
194 | local InverseColor = BrickColor.new(Color3.new(1 - Colorpart1, 1 - Colorpart2, 1 - Colorpart3)) | |
195 | makeframe = function(par, trans, pos, size, color, name) | |
196 | ||
197 | local frame = Instance.new("Frame") | |
198 | frame.Parent = par | |
199 | frame.BackgroundTransparency = trans | |
200 | frame.BorderSizePixel = 2 | |
201 | frame.Position = pos | |
202 | frame.Size = size | |
203 | frame.BackgroundColor3 = color | |
204 | frame.Name = name | |
205 | return frame | |
206 | end | |
207 | ||
208 | makelabel = function(par, text, trans, stroketrans, name) | |
209 | ||
210 | local label = Instance.new("TextLabel") | |
211 | label.Parent = par | |
212 | label.BackgroundTransparency = 1 | |
213 | label.Size = ud(1, 0, 1, 0) | |
214 | label.Position = ud(0, 0, 0, 0) | |
215 | label.TextColor3 = c3(255, 255, 255) | |
216 | label.TextStrokeTransparency = stroketrans | |
217 | label.TextTransparency = trans | |
218 | label.FontSize = Enum.FontSize.Size32 | |
219 | label.Font = Enum.Font.Legacy | |
220 | label.BorderSizePixel = 0 | |
221 | label.TextScaled = true | |
222 | label.Text = text | |
223 | label.Name = name | |
224 | return label | |
225 | end | |
226 | ||
227 | framesk1 = makeframe(scrn, 0.5, ud(0.23, 0, 0.93, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 1") | |
228 | framesk2 = makeframe(scrn, 0.5, ud(0.5, 0, 0.93, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 2") | |
229 | framesk3 = makeframe(scrn, 0.5, ud(0.5, 0, 0.86, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 3") | |
230 | framesk4 = makeframe(scrn, 0.5, ud(0.23, 0, 0.86, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Frame 4") | |
231 | bar1 = makeframe(framesk1, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 1") | |
232 | bar2 = makeframe(framesk2, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 2") | |
233 | bar3 = makeframe(framesk3, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 3") | |
234 | bar4 = makeframe(framesk4, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Bar 4") | |
235 | text1 = makelabel(framesk1, "[C] Ability 3", 1, 1, "Text 1") | |
236 | text2 = makelabel(framesk2, "[V] Ability 4", 1, 1, "Text 2") | |
237 | text3 = makelabel(framesk3, "[X] Ability 2", 1, 1, "Text 3") | |
238 | text4 = makelabel(framesk4, "[Z] Ability 1", 1, 1, "Text 4") | |
239 | manabar = makeframe(scrn, 0.5, ud(0.23, 0, 0.82, 0), ud(0.26, 0, 0, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Mana Bar") | |
240 | manacover = makeframe(manabar, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(Colorpart1, Colorpart2, Colorpart3), "Mana Cover") | |
241 | manatext = makelabel(manabar, "Mana", 1, 1, "Mana Text") | |
242 | healthbar = makeframe(scrn, 0.5, ud(0.5, 0, 0.82, 0), ud(0.26, 0, 0, 0), c3(1, 0.19607843137255, 0.19607843137255), "Health Bar") | |
243 | healthcover = makeframe(healthbar, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(1, 0.19607843137255, 0.19607843137255), "Health Cover") | |
244 | healthtext = makelabel(healthbar, "Health", 1, 1, "Health Text") | |
245 | if allowstunbar == true then | |
246 | stunframe = makeframe(scrn, 0.5, ud(0.5, 0, 0.78, 0), ud(0.26, 0, 0, 0), c3(1, 1, 0.19607843137255), "Stun Frame") | |
247 | stunbar = makeframe(stunframe, 0, ud(0, 0, 0, 0), ud(0, 0, 1, 0), c3(1, 1, 0.19607843137255), "Stun Bar") | |
248 | stuntext = makelabel(stunframe, "Stun", 1, 1, "Stun Text") | |
249 | end | |
250 | if showstats == true then | |
251 | defenseframe = makeframe(scrn, 0.5, ud(0.23, 0, 0.78, 0), ud(0.075, 0, 0, 0), c3(0.3921568627451, 0.3921568627451, 1), "Defense Frame") | |
252 | damageframe = makeframe(scrn, 0.5, ud(0.3225, 0, 0.78, 0), ud(0.075, 0, 0, 0), c3(1, 0.3921568627451, 0.3921568627451), "Damage Frame") | |
253 | movementframe = makeframe(scrn, 0.5, ud(0.415, 0, 0.78, 0), ud(0.075, 0, 0, 0), c3(0.3921568627451, 1, 0.3921568627451), "Movement Frame") | |
254 | defensetext = makelabel(defenseframe, "Defense: " .. Defense.Value, 1, 1, "Defense Text") | |
255 | damagetext = makelabel(damageframe, "Damage: " .. Damage.Value, 1, 1, "Damage Text") | |
256 | movementtext = makelabel(movementframe, "Movement: " .. Movement.Value, 1, 1, "Movement Text") | |
257 | end | |
258 | NoOutline = function(Part) | |
259 | ||
260 | Part.TopSurface = 10 | |
261 | end | |
262 | ||
263 | local weldBetween = function(a, b) | |
264 | ||
265 | local weldd = Instance.new("ManualWeld") | |
266 | weldd.Part0 = a | |
267 | weldd.Part1 = b | |
268 | weldd.C0 = CFrame.new() | |
269 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
270 | weldd.Parent = a | |
271 | return weldd | |
272 | end | |
273 | ||
274 | nooutline = function(part) | |
275 | ||
276 | part.TopSurface = 10 | |
277 | end | |
278 | ||
279 | part = function(formfactor, parent, material, reflectance, transparency, brickcolor, name, size) | |
280 | ||
281 | local fp = it("Part") | |
282 | fp.formFactor = formfactor | |
283 | fp.Parent = parent | |
284 | fp.Reflectance = reflectance | |
285 | fp.Transparency = transparency | |
286 | fp.CanCollide = false | |
287 | fp.Locked = true | |
288 | fp.BrickColor = BrickColor.new(tostring(brickcolor)) | |
289 | fp.Name = name | |
290 | fp.Size = size | |
291 | fp.Position = Character.Torso.Position | |
292 | nooutline(fp) | |
293 | fp.Material = material | |
294 | fp:BreakJoints() | |
295 | return fp | |
296 | end | |
297 | ||
298 | mesh = function(Mesh, part, meshtype, meshid, offset, scale) | |
299 | ||
300 | local mesh = it(Mesh) | |
301 | mesh.Parent = part | |
302 | if Mesh == "SpecialMesh" then | |
303 | mesh.MeshType = meshtype | |
304 | mesh.MeshId = meshid | |
305 | end | |
306 | mesh.Offset = offset | |
307 | mesh.Scale = scale | |
308 | return mesh | |
309 | end | |
310 | ||
311 | weld = function(parent, part0, part1, c0, c1) | |
312 | ||
313 | local weld = it("Motor") | |
314 | weld.Parent = parent | |
315 | weld.Part0 = part0 | |
316 | weld.Part1 = part1 | |
317 | weld.C0 = c0 | |
318 | weld.C1 = c1 | |
319 | return weld | |
320 | end | |
321 | ||
322 | local WeaponName = "Russian Kick" | |
323 | local ClassName = "Russian Kick" | |
324 | local PlayerSize = 1 | |
325 | local RWC0 = cf(-0.5, 0, 0) * angles(rad(0), rad(90), rad(0)) | |
326 | local LWC0 = cf(0.5, 0, 0) * angles(rad(0), rad(-90), rad(0)) | |
327 | if PlayerSize ~= 1 then | |
328 | RootPart.Size = RootPart.Size * PlayerSize | |
329 | Torso.Size = Torso.Size * PlayerSize | |
330 | Head.Size = Head.Size * PlayerSize | |
331 | RightArm.Size = RightArm.Size * PlayerSize | |
332 | LeftArm.Size = LeftArm.Size * PlayerSize | |
333 | RightLeg.Size = RightLeg.Size * PlayerSize | |
334 | LeftLeg.Size = LeftLeg.Size * PlayerSize | |
335 | RootJoint.Parent = RootPart | |
336 | Neck.Parent = Torso | |
337 | LS.Parent = Torso | |
338 | RS.Parent = Torso | |
339 | LH.Parent = Torso | |
340 | RH.Parent = Torso | |
341 | RootJoint.C0 = RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) | |
342 | Neck.C0 = necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(0)) | |
343 | Neck.C1 = angles(rad(90), rad(180), 0) * cf(0, 0, -0.5 * PlayerSize) | |
344 | RS.C0 = cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0 | |
345 | LS.C0 = cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0 | |
346 | RS.C1 = angles(0, rad(90), 0) * cf(0, 0.5 * PlayerSize, -0.5) | |
347 | LS.C1 = angles(0, rad(-90), 0) * cf(0, 0.5 * PlayerSize, -0.5) | |
348 | RH.C0 = cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0)) | |
349 | LH.C0 = cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0)) | |
350 | RH.C1 = angles(0, rad(90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize) | |
351 | LH.C1 = angles(0, rad(-90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize) | |
352 | for _,v in pairs(Character:GetChildren()) do | |
353 | if v.ClassName == "Hat" or v.ClassName == "Accessory" then | |
354 | v.Parent = nil | |
355 | v.Parent = Character | |
356 | v.Handle.Mesh.Scale = v.Handle.Mesh.Scale * PlayerSize | |
357 | for _,b in pairs(v.Handle:GetChildren()) do | |
358 | if b.ClassName == "Weld" or b.ClassName == "Motor" then | |
359 | local p1 = b.Part1 | |
360 | b.Part1 = nil | |
361 | local c01, c02, c03, c04, c05, c06, c07, c08, c09, c010, c011, c012 = b.C0:components() | |
362 | local c11, c12, c13, c14, c15, c16, c17, c18, c19, c110, c111, c112 = b.C1:components() | |
363 | b.C0 = cf(c01 * PlayerSize, c02 * PlayerSize, c03 * PlayerSize, c04, c05, c06, c07, c08, c09, c010, c011, c012) | |
364 | b.C1 = cf(c11 * PlayerSize, c12 * PlayerSize, c13 * PlayerSize, c14, c15, c16, c17, c18, c19, c110, c111, c112) | |
365 | b.Part1 = p1 | |
366 | end | |
367 | end | |
368 | end | |
369 | end | |
370 | end | |
371 | m = Instance.new("Model", Character) | |
372 | m.Name = WeaponName | |
373 | Effects = Instance.new("Folder", m) | |
374 | Effects.Name = "Effects" | |
375 | Humanoid.Died:connect(function() | |
376 | ||
377 | attack = true | |
378 | for _,v in pairs(Character:GetChildren()) do | |
379 | if v.ClassName == "Model" then | |
380 | v:Destroy() | |
381 | end | |
382 | end | |
383 | end | |
384 | ) | |
385 | for i,v in pairs(Character:GetChildren()) do | |
386 | if v.ClassName == "Model" then | |
387 | for _,c in pairs(v:GetChildren()) do | |
388 | if c.ClassName == "Part" then | |
389 | c.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001) | |
390 | end | |
391 | end | |
392 | end | |
393 | end | |
394 | print(ClassName .. " loaded.") | |
395 | clerp = function(a, b, t) | |
396 | return a:lerp(b, t) | |
397 | end | |
398 | ||
399 | positiveangle = function(number) | |
400 | ||
401 | if number > 0 then | |
402 | number = 0 | |
403 | end | |
404 | return number | |
405 | end | |
406 | ||
407 | negativeangle = function(number) | |
408 | ||
409 | if number < 0 then | |
410 | number = 0 | |
411 | end | |
412 | return number | |
413 | end | |
414 | ||
415 | so = function(id, par, vol, pit) | |
416 | ||
417 | coroutine.resume(coroutine.create(function() | |
418 | ||
419 | local sou = Instance.new("Sound", par or workspace) | |
420 | sou.Volume = vol | |
421 | sou.Pitch = pit or 1 | |
422 | sou.SoundId = "http://roblox.com/asset/?id=" .. id | |
423 | hbwait() | |
424 | sou:play() | |
425 | game:GetService("Debris"):AddItem(sou, 10) | |
426 | end | |
427 | )) | |
428 | end | |
429 | ||
430 | GetDistance = function(Part1, Part2, magnitude) | |
431 | ||
432 | local target = Part1.Position - Part2.Position | |
433 | local mag = target.magnitude | |
434 | if mag <= magnitude then | |
435 | return true | |
436 | else | |
437 | return false | |
438 | end | |
439 | end | |
440 | ||
441 | rayCast = function(Pos, Dir, Max, Ignore) | |
442 | ||
443 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
444 | end | |
445 | ||
446 | DamageStatLabel = function(labeltype, cframe, text, color) | |
447 | ||
448 | local c = part(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", vt(0, 0, 0)) | |
449 | c.CFrame = cf(cframe.p + vt(0, 1.5, 0)) | |
450 | game:GetService("Debris"):AddItem(c, 5) | |
451 | Instance.new("BodyGyro", c) | |
452 | local f = Instance.new("BodyPosition", c) | |
453 | f.P = 2000 | |
454 | f.D = 100 | |
455 | f.maxForce = vt(math.huge, math.huge, math.huge) | |
456 | if labeltype == "Normal" then | |
457 | f.position = c.Position + vt(math.random(-2, 2), 6, math.random(-2, 2)) | |
458 | else | |
459 | if labeltype == "Debuff" then | |
460 | f.position = c.Position + vt(math.random(-2, 2), 8, math.random(-2, 2)) | |
461 | else | |
462 | if labeltype == "Interruption" then | |
463 | f.position = c.Position + vt(math.random(-2, 2), 8, math.random(-2, 2)) | |
464 | end | |
465 | end | |
466 | end | |
467 | game:GetService("Debris"):AddItem(c, 5) | |
468 | local bg = Instance.new("BillboardGui", c) | |
469 | bg.Adornee = c | |
470 | bg.Size = UDim2.new(2.5, 0, 2.5, 0) | |
471 | bg.StudsOffset = vt(-2, 2, 0) | |
472 | bg.AlwaysOnTop = false | |
473 | local tl = Instance.new("TextLabel", bg) | |
474 | tl.BackgroundTransparency = 1 | |
475 | tl.Size = UDim2.new(2.5, 0, 2.5, 0) | |
476 | tl.Text = text | |
477 | tl.Font = Enum.Font.SourceSans | |
478 | tl.FontSize = Enum.FontSize.Size42 | |
479 | tl.TextColor3 = color | |
480 | tl.TextScaled = false | |
481 | tl.TextStrokeTransparency = 0 | |
482 | tl.TextScaled = true | |
483 | tl.TextWrapped = true | |
484 | f.Parent = c | |
485 | coroutine.resume(coroutine.create(function(Part, BodyPosition, TextLabel) | |
486 | ||
487 | wait(0.25) | |
488 | for i = 1, 5 do | |
489 | wait() | |
490 | BodyPosition.position = Part.Position - vt(0, 0.5, 0) | |
491 | end | |
492 | wait(1.25) | |
493 | for i = 1, 5 do | |
494 | wait() | |
495 | TextLabel.TextTransparency = TextLabel.TextTransparency + 0.2 | |
496 | TextLabel.TextStrokeTransparency = TextLabel.TextStrokeTransparency + 0.2 | |
497 | BodyPosition.position = Part.Position + vt(0, 0.5, 0) | |
498 | end | |
499 | Part.Parent = nil | |
500 | end | |
501 | ), c, f, tl) | |
502 | end | |
503 | ||
504 | IncreaseStat = function(Location, Stat, Amount, Duration, ShowTheStat) | |
505 | ||
506 | -- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1 | |
507 | ||
508 | -- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1 | |
509 | ||
510 | if Location:FindFirstChild("Stats") ~= nil and Location.Stats:FindFirstChild("BlockValue") ~= nil and Location.Stats:FindFirstChild("BlockValue").Value ~= true and Location.Stats[Stat] ~= nil then | |
511 | Location.Stats[Stat].Value = Location.Stats[Stat].Value + Amount | |
512 | if ShowTheStat == true then | |
513 | if Stat == "Defense" then | |
514 | DamageStatLabel("Debuff", Location.Head.CFrame, "+Defense", c3(1, 1, 1)) | |
515 | else | |
516 | if Stat == "Damage" then | |
517 | DamageStatLabel("Debuff", Location.Head.CFrame, "+Damage", c3(1, 1, 1)) | |
518 | else | |
519 | if Stat == "Movement" then | |
520 | DamageStatLabel("Debuff", Location.Head.CFrame, "+Movement", c3(1, 1, 1)) | |
521 | end | |
522 | end | |
523 | end | |
524 | end | |
525 | coroutine.resume(coroutine.create(function(CurrentDecrease) | |
526 | ||
527 | wait(Duration) | |
528 | CurrentDecrease.Value = CurrentDecrease.Value - Amount | |
529 | end | |
530 | ), Location.Stats[Stat]) | |
531 | end | |
532 | DamageStatLabel("Interruption", Location.Head.CFrame, "Blocked!", Color3.new(0, 0.3921568627451, 1)) | |
533 | end | |
534 | ||
535 | DecreaseStat = function(Location, Stat, Amount, Duration, ShowTheStat) | |
536 | ||
537 | -- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1 | |
538 | ||
539 | -- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1 | |
540 | ||
541 | if Location:FindFirstChild("Stats") ~= nil and Location.Stats:FindFirstChild("BlockValue") ~= nil and Location.Stats:FindFirstChild("BlockValue").Value ~= true and Location.Stats[Stat] ~= nil then | |
542 | Location.Stats[Stat].Value = Location.Stats[Stat].Value - Amount | |
543 | if ShowTheStat == true then | |
544 | if Stat == "Defense" then | |
545 | DamageStatLabel("Debuff", Location.Head.CFrame, "-Defense", c3(1, 1, 1)) | |
546 | else | |
547 | if Stat == "Damage" then | |
548 | DamageStatLabel("Debuff", Location.Head.CFrame, "-Damage", c3(1, 1, 1)) | |
549 | else | |
550 | if Stat == "Movement" then | |
551 | DamageStatLabel("Debuff", Location.Head.CFrame, "-Movement", c3(1, 1, 1)) | |
552 | end | |
553 | end | |
554 | end | |
555 | end | |
556 | coroutine.resume(coroutine.create(function(CurrentDecrease) | |
557 | ||
558 | wait(Duration) | |
559 | CurrentDecrease.Value = CurrentDecrease.Value + Amount | |
560 | end | |
561 | ), Location.Stats[Stat]) | |
562 | end | |
563 | DamageStatLabel("Interruption", Location.Head.CFrame, "Blocked!", Color3.new(0, 0.3921568627451, 1)) | |
564 | end | |
565 | ||
566 | Damagefunc = function(hit, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staggerhit, ranged, DecreaseTheStat, DecreaseAmount, DecreaseDuration, ShowDecreasedStat) | |
567 | ||
568 | if hit.Parent == nil then | |
569 | return | |
570 | end | |
571 | h = hit.Parent:FindFirstChild("Humanoid") | |
572 | for _,v in pairs(hit.Parent:GetChildren()) do | |
573 | if v:IsA("Humanoid") then | |
574 | h = v | |
575 | end | |
576 | end | |
577 | if hit.Name == "Hitbox" and ranged ~= true and hit.Parent ~= m then | |
578 | StaggerHitAnim.Value = true | |
579 | so(HitWeaponSounds[math.random(1, #HitWeaponSounds)], hit, 1, 1) | |
580 | return | |
581 | end | |
582 | if hit.Parent.Parent:FindFirstChild("Torso") ~= nil then | |
583 | h = hit.Parent.Parent:FindFirstChild("Humanoid") | |
584 | end | |
585 | if hit.Parent.className == "Hat" then | |
586 | hit = hit.Parent.Parent:FindFirstChild("Head") | |
587 | end | |
588 | if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
589 | if hit.Parent:FindFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then | |
590 | return | |
591 | end | |
592 | if AntiTeamKill.Value == true and Player.Neutral == false and game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil and game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == Player.TeamColor then | |
593 | return | |
594 | end | |
595 | if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent:FindFirstChild("Humanoid").Health <= 0 then | |
596 | return | |
597 | end | |
598 | if hit.Parent:FindFirstChild("Stats") ~= nil and hit.Parent.Stats:FindFirstChild("StunValue") ~= nil then | |
599 | hit.Parent.Stats:FindFirstChild("StunValue").Value = hit.Parent.Stats:FindFirstChild("StunValue").Value + incstun | |
600 | end | |
601 | if hit.Parent:FindFirstChild("Stats") ~= nil and hit.Parent.Stats:FindFirstChild("StaggerAnim") ~= nil and stagger == true then | |
602 | hit.Parent.Stats:FindFirstChild("StaggerAnim").Value = true | |
603 | end | |
604 | if hit.Parent:FindFirstChild("Stats") ~= nil and hit.Parent.Stats:FindFirstChild("BlockValue") ~= nil and hit.Parent.Stats:FindFirstChild("BlockValue").Value == true then | |
605 | if hit.Parent.Stats:FindFirstChild("BlockDebounce") == nil then | |
606 | DamageStatLabel("Interruption", hit.Parent.Head.CFrame, "Blocked!", Color3.new(0, 0.3921568627451, 1)) | |
607 | local BlockDebounce = Instance.new("BoolValue", hit.Parent.Stats) | |
608 | BlockDebounce.Name = "BlockDebounce" | |
609 | BlockDebounce.Value = true | |
610 | game:GetService("Debris"):AddItem(BlockDebounce, 0.1) | |
611 | end | |
612 | do | |
613 | if ranged ~= true then | |
614 | do | |
615 | if hit.Parent.Stats:FindFirstChild("BlockDebounce2") == nil then | |
616 | local BlockDebounce2 = Instance.new("BoolValue", hit.Parent.Stats) | |
617 | BlockDebounce2.Name = "BlockDebounce2" | |
618 | BlockDebounce2.Value = true | |
619 | game:GetService("Debris"):AddItem(BlockDebounce2, 0.1) | |
620 | so(HitBlockSounds[math.random(1, #HitBlockSounds)], hit, 1, 1) | |
621 | end | |
622 | hit.Parent.Stats:FindFirstChild("BlockValue").Value = false | |
623 | StaggerAnim.Value = true | |
624 | do return end | |
625 | if DecreaseTheStat ~= nil and hit.Parent:FindFirstChild("Stats") ~= nil then | |
626 | if DecreaseTheStat == "Defense" then | |
627 | DecreaseStat(hit.Parent, "Defense", DecreaseAmount, DecreaseDuration, ShowDecreasedStat) | |
628 | else | |
629 | if DecreaseTheStat == "Damage" then | |
630 | DecreaseStat(hit.Parent, "Damage", DecreaseAmount, DecreaseDuration, ShowDecreasedStat) | |
631 | else | |
632 | if DecreaseTheStat == "Movement" then | |
633 | DecreaseStat(hit.Parent, "Movement", DecreaseAmount, DecreaseDuration, ShowDecreasedStat) | |
634 | end | |
635 | end | |
636 | end | |
637 | end | |
638 | local D = math.random(minim, maxim) * Damage.Value | |
639 | if hit.Parent:FindFirstChild("Stats") ~= nil then | |
640 | if hit.Parent.Stats:FindFirstChild("Defense") then | |
641 | if CanPenetrateArmor.Value == true then | |
642 | D = D / hit.Parent.Stats:FindFirstChild("Defense").Value | |
643 | -- DECOMPILER ERROR at PC377: Unhandled construct in 'MakeBoolean' P1 | |
644 | ||
645 | if hit.Parent.Stats:FindFirstChild("Defense") ~= nil or CanCrit.Value == true then | |
646 | CritChanceNumber = math.random(1, CritChance.Value) | |
647 | if CritChanceNumber == CritChance.Value then | |
648 | D = D * 2 | |
649 | end | |
650 | end | |
651 | D = math.floor(D) | |
652 | h.Health = h.Health - D | |
653 | if D <= 3 and staggerhit == true then | |
654 | if ranged ~= true then | |
655 | StaggerHitAnim.Value = true | |
656 | end | |
657 | if ranged ~= true then | |
658 | so(HitArmorSounds[math.random(1, #HitArmorSounds)], hit, 1, 1) | |
659 | end | |
660 | else | |
661 | if D > 3 and ranged ~= true then | |
662 | so(HitPlayerSounds[math.random(1, #HitPlayerSounds)], hit, 1, 1) | |
663 | end | |
664 | end | |
665 | if D > 3 and D < 20 then | |
666 | if CanCrit.Value == true and CritChanceNumber == CritChance.Value then | |
667 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, "Crit! " .. D, Color3.new(0.7843137254902, 0, 0)) | |
668 | so("296102734", hit, 1, 1) | |
669 | else | |
670 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, D, Color3.new(1, 0.86274509803922, 0)) | |
671 | end | |
672 | else | |
673 | if D >= 20 then | |
674 | if CanCrit.Value == true and CritChanceNumber == CritChance.Value then | |
675 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, "Crit! " .. D, Color3.new(0.7843137254902, 0, 0)) | |
676 | so("296102734", hit, 1, 1) | |
677 | else | |
678 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, D, Color3.new(1, 0, 0)) | |
679 | end | |
680 | else | |
681 | if D <= 3 then | |
682 | if CanCrit.Value == true and CritChanceNumber == CritChance.Value then | |
683 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, "Crit! " .. D, Color3.new(0.7843137254902, 0, 0)) | |
684 | so("296102734", hit, 1, 1) | |
685 | else | |
686 | DamageStatLabel("Normal", hit.Parent.Head.CFrame, D, Color3.new(0.88235294117647, 0.88235294117647, 0.88235294117647)) | |
687 | end | |
688 | end | |
689 | end | |
690 | end | |
691 | do | |
692 | if Type == "Normal" then | |
693 | local vp = Instance.new("BodyVelocity") | |
694 | vp.P = 500 | |
695 | vp.maxForce = vt(math.huge, 0, math.huge) | |
696 | if KnockbackType == 1 then | |
697 | vp.Velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05 | |
698 | else | |
699 | if KnockbackType == 2 then | |
700 | vp.Velocity = Property.CFrame.lookVector * knockback | |
701 | end | |
702 | end | |
703 | if knockback > 0 then | |
704 | vp.Parent = hit.Parent.Torso | |
705 | end | |
706 | game:GetService("Debris"):AddItem(vp, 0.5) | |
707 | end | |
708 | local DebounceHit = Instance.new("BoolValue", hit.Parent) | |
709 | DebounceHit.Name = "DebounceHit" | |
710 | DebounceHit.Value = true | |
711 | game:GetService("Debris"):AddItem(DebounceHit, Delay) | |
712 | end | |
713 | end | |
714 | end | |
715 | end | |
716 | end | |
717 | end | |
718 | end | |
719 | end | |
720 | end | |
721 | end | |
722 | ||
723 | MagniDamage = function(Part, magni, mindam, maxdam, knock, Type, Property, Delay, KnockbackType, incstun, stagger, staggerhit, ranged, MagicDecreaseTheStat, MagicDecreaseAmount, MagicDecreaseDuration, MagicShowDecreasedStat) | |
724 | ||
725 | for _,c in pairs(workspace:GetChildren()) do | |
726 | local hum = (c:FindFirstChild("Humanoid")) | |
727 | local head = nil | |
728 | if hum ~= nil then | |
729 | head = c:FindFirstChild("Torso") | |
730 | if head ~= nil then | |
731 | local targ = head.Position - Part.Position | |
732 | local mag = targ.magnitude | |
733 | if mag <= magni and c.Name ~= Player.Name then | |
734 | Damagefunc(head, mindam, maxdam, knock, Type, Property, Delay, KnockbackType, incstun, stagger, staggerhit, ranged, MagicDecreaseTheStat, MagicDecreaseAmount, MagicDecreaseDuration, MagicShowDecreasedStat) | |
735 | end | |
736 | end | |
737 | do | |
738 | for _,d in pairs(c:GetChildren()) do | |
739 | if d.ClassName == "Model" and ranged ~= true then | |
740 | head = d:FindFirstChild("Hitbox") | |
741 | if head ~= nil then | |
742 | local targ = head.Position - Part.Position | |
743 | local mag = targ.magnitude | |
744 | if mag <= magni and c.Name ~= Player.Name then | |
745 | local hitrefpart = part(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", vt()) | |
746 | hitrefpart.Anchored = true | |
747 | hitrefpart.CFrame = cf(head.Position) | |
748 | so(HitWeaponSounds[math.random(1, #HitWeaponSounds)], hitrefpart, 1, 1) | |
749 | StaggerHitAnim.Value = true | |
750 | end | |
751 | end | |
752 | end | |
753 | end | |
754 | do | |
755 | -- DECOMPILER ERROR at PC107: LeaveBlock: unexpected jumping out DO_STMT | |
756 | ||
757 | -- DECOMPILER ERROR at PC107: LeaveBlock: unexpected jumping out IF_THEN_STMT | |
758 | ||
759 | -- DECOMPILER ERROR at PC107: LeaveBlock: unexpected jumping out IF_STMT | |
760 | ||
761 | end | |
762 | end | |
763 | end | |
764 | end | |
765 | end | |
766 | ||
767 | MagniBufforDebuff = function(Part, Magni, Type, Stat, Amount, Duration, ShowTheBufforDebuff, ApplyToOthersInstead) | |
768 | ||
769 | if Player.Neutral == true then | |
770 | if Type == "Buff" then | |
771 | IncreaseStat(Character, Stat, Amount, Duration, ShowTheBufforDebuff) | |
772 | else | |
773 | if Type == "Debuff" then | |
774 | DecreaseStat(Character, Stat, Amount, Duration, ShowTheBufforDebuff) | |
775 | end | |
776 | end | |
777 | end | |
778 | for _,c in pairs(workspace:GetChildren()) do | |
779 | local hum = (c:FindFirstChild("Humanoid")) | |
780 | local head = nil | |
781 | if hum ~= nil then | |
782 | head = c:FindFirstChild("Torso") | |
783 | if head ~= nil then | |
784 | local targ = head.Position - Part.Position | |
785 | local mag = targ.magnitude | |
786 | -- DECOMPILER ERROR at PC83: Unhandled construct in 'MakeBoolean' P1 | |
787 | ||
788 | if ApplyToOthersInstead == true and mag <= Magni and c.Name ~= Player.Name and Player.Neutral == false and game.Players:GetPlayerFromCharacter(head.Parent) ~= nil and game.Players:GetPlayerFromCharacter(head.Parent).TeamColor == Player.TeamColor then | |
789 | if Type == "Buff" then | |
790 | IncreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff) | |
791 | else | |
792 | if Type == "Debuff" then | |
793 | DecreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff) | |
794 | end | |
795 | end | |
796 | end | |
797 | end | |
798 | end | |
799 | if ApplyToOthersInstead == false and mag <= Magni and Player.Neutral == false and game.Players:GetPlayerFromCharacter(head.Parent) ~= nil and game.Players:GetPlayerFromCharacter(head.Parent).TeamColor == Player.TeamColor then | |
800 | if Type == "Buff" then | |
801 | IncreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff) | |
802 | else | |
803 | if Type == "Debuff" then | |
804 | DecreaseStat(head.Parent, Stat, Amount, Duration, ShowTheBufforDebuff) | |
805 | end | |
806 | end | |
807 | end | |
808 | end | |
809 | end | |
810 | ||
811 | Lightning = function(p0, p1, tym, ofs, brickcolor, material, th, tra, last) | |
812 | ||
813 | local magz = p0 - p1.magnitude | |
814 | local curpos = p0 | |
815 | local trz = {-ofs, ofs} | |
816 | for i = 1, tym do | |
817 | local li = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt(th, th, magz / tym)) | |
818 | do | |
819 | li.Anchored = true | |
820 | local ofz = vt(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)]) | |
821 | local trolpos = cf(curpos, p1) * cf(0, 0, magz / tym).p + ofz | |
822 | if tym == i then | |
823 | local magz2 = curpos - p1.magnitude | |
824 | li.Size = vt(th, th, magz2) | |
825 | li.CFrame = cf(curpos, p1) * cf(0, 0, -magz2 / 2) | |
826 | else | |
827 | do | |
828 | do | |
829 | li.CFrame = cf(curpos, trolpos) * cf(0, 0, magz / tym / 2) | |
830 | curpos = li.CFrame * cf(0, 0, magz / tym / 2).p | |
831 | game.Debris:AddItem(li, last) | |
832 | coroutine.resume(coroutine.create(function() | |
833 | ||
834 | while li.Transparency ~= 1 do | |
835 | for i = 0, 1, last do | |
836 | hbwait() | |
837 | li.Transparency = li.Transparency + 0.1 / last | |
838 | end | |
839 | end | |
840 | end | |
841 | )) | |
842 | end | |
843 | -- DECOMPILER ERROR at PC118: LeaveBlock: unexpected jumping out IF_ELSE_STMT | |
844 | ||
845 | -- DECOMPILER ERROR at PC118: LeaveBlock: unexpected jumping out IF_STMT | |
846 | ||
847 | -- DECOMPILER ERROR at PC118: LeaveBlock: unexpected jumping out DO_STMT | |
848 | ||
849 | end | |
850 | end | |
851 | end | |
852 | end | |
853 | end | |
854 | ||
855 | MagicRing = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
856 | ||
857 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
858 | prt.Anchored = true | |
859 | prt.CFrame = cframe | |
860 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", vt(0, 0, 0), vt(x1, y1, z1)) | |
861 | game:GetService("Debris"):AddItem(prt, 10) | |
862 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
863 | ||
864 | for i = 0, 1, delay do | |
865 | hbwait() | |
866 | Part.CFrame = Part.CFrame | |
867 | Part.Transparency = i | |
868 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
869 | end | |
870 | Part.Parent = nil | |
871 | end | |
872 | ), prt, msh) | |
873 | end | |
874 | ||
875 | MagicWave = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
876 | ||
877 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
878 | prt.Anchored = true | |
879 | prt.CFrame = cframe | |
880 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, -0.1 * z1), vt(x1, y1, z1)) | |
881 | game:GetService("Debris"):AddItem(prt, 10) | |
882 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
883 | ||
884 | for i = 0, 1, delay do | |
885 | hbwait() | |
886 | Part.CFrame = Part.CFrame | |
887 | Part.Transparency = i | |
888 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
889 | end | |
890 | Part.Parent = nil | |
891 | end | |
892 | ), prt, msh) | |
893 | end | |
894 | ||
895 | MagicBlock = function(brickcolor, material, rotate, cframe, x1, y1, z1, x3, y3, z3, delay) | |
896 | ||
897 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
898 | prt.Anchored = true | |
899 | prt.CFrame = cframe * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
900 | local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
901 | game:GetService("Debris"):AddItem(prt, 10) | |
902 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
903 | ||
904 | for i = 0, 1, delay do | |
905 | hbwait() | |
906 | if rotate == true then | |
907 | Part.CFrame = Part.CFrame * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
908 | end | |
909 | Part.Transparency = i | |
910 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
911 | end | |
912 | Part.Parent = nil | |
913 | end | |
914 | ), prt, msh) | |
915 | end | |
916 | ||
917 | MagicBlock2 = function(brickcolor, material, rotate, cframe, x1, y1, z1, x3, y3, z3, delay) | |
918 | ||
919 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
920 | prt.Anchored = true | |
921 | prt.CFrame = cframe * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
922 | local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
923 | game:GetService("Debris"):AddItem(prt, 10) | |
924 | CF = prt.CFrame | |
925 | num = math.random(5, 20) | |
926 | coroutine.resume(coroutine.create(function(Part, Mesh, CF2, Num) | |
927 | ||
928 | for i = 0, 1, delay do | |
929 | hbwait() | |
930 | if rotate == true then | |
931 | Part.CFrame = CF2 * cf(0, i * Num, 0) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
932 | else | |
933 | Part.CFrame = CF2 * cf(0, i * Num, 0) | |
934 | end | |
935 | Part.Transparency = i | |
936 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
937 | end | |
938 | Part.Parent = nil | |
939 | end | |
940 | ), prt, msh, CF, num) | |
941 | end | |
942 | ||
943 | MagicCylinder = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
944 | ||
945 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
946 | prt.Anchored = true | |
947 | prt.CFrame = cframe | |
948 | local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
949 | game:GetService("Debris"):AddItem(prt, 10) | |
950 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
951 | ||
952 | for i = 0, 1, delay do | |
953 | hbwait() | |
954 | Part.Transparency = i | |
955 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
956 | end | |
957 | Part.Parent = nil | |
958 | end | |
959 | ), prt, msh) | |
960 | end | |
961 | ||
962 | MagicCircle = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
963 | ||
964 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
965 | prt.Anchored = true | |
966 | prt.CFrame = cframe | |
967 | local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
968 | game:GetService("Debris"):AddItem(prt, 10) | |
969 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
970 | ||
971 | for i = 0, 1, delay do | |
972 | hbwait() | |
973 | Part.Transparency = i | |
974 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
975 | end | |
976 | Part.Parent = nil | |
977 | end | |
978 | ), prt, msh) | |
979 | end | |
980 | ||
981 | MagicHead = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
982 | ||
983 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
984 | prt.Anchored = true | |
985 | prt.CFrame = cframe | |
986 | local msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
987 | game:GetService("Debris"):AddItem(prt, 10) | |
988 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
989 | ||
990 | for i = 0, 1, delay do | |
991 | hbwait() | |
992 | Part.Transparency = i | |
993 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
994 | end | |
995 | Part.Parent = nil | |
996 | end | |
997 | ), prt, msh) | |
998 | end | |
999 | ||
1000 | BreakEffect = function(brickcolor, material, rotate, cframe, x1, y1, z1, delay) | |
1001 | ||
1002 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1003 | prt.Anchored = true | |
1004 | prt.CFrame = cframe * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1005 | local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
1006 | game:GetService("Debris"):AddItem(prt, 10) | |
1007 | coroutine.resume(coroutine.create(function(Part, CF, Numbb, randnumb) | |
1008 | ||
1009 | CF = Part.CFrame | |
1010 | Numbb = 0 | |
1011 | randnumb = math.random() - math.random() | |
1012 | for i = 0, 1, delay do | |
1013 | hbwait() | |
1014 | CF = CF * cf(0, 1, 0) | |
1015 | if rotate == true then | |
1016 | Part.CFrame = CF * angles(Numbb, 0, 0) | |
1017 | else | |
1018 | if rotate == false then | |
1019 | Part.CFrame = CF | |
1020 | end | |
1021 | end | |
1022 | Part.Transparency = i | |
1023 | Numbb = Numbb + (randnumb) | |
1024 | end | |
1025 | Part.Parent = nil | |
1026 | end | |
1027 | ), prt, CF, Numbb, randnumb) | |
1028 | end | |
1029 | ||
1030 | ElecEffect = function(brickcolor, material, cf, x, y, z, delay) | |
1031 | ||
1032 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1033 | prt.Anchored = true | |
1034 | prt.CFrame = cf | |
1035 | xval = math.random() | |
1036 | yval = math.random() | |
1037 | zval = math.random() | |
1038 | local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x, y, z)) | |
1039 | game:GetService("Debris"):AddItem(prt, 10) | |
1040 | coroutine.resume(coroutine.create(function(Part, Mesh, xvaal, yvaal, zvaal) | |
1041 | ||
1042 | for i = 0, 1, delay do | |
1043 | hbwait() | |
1044 | Part.CFrame = Part.CFrame | |
1045 | xvaal = xvaal - 0.1 * (delay * 10) | |
1046 | yvaal = yvaal - 0.1 * (delay * 10) | |
1047 | zvaal = zvaal - 0.1 * (delay * 10) | |
1048 | Mesh.Scale = Mesh.Scale + vt(xvaal, yvaal, zvaal) | |
1049 | Part.Transparency = i | |
1050 | end | |
1051 | Part.Parent = nil | |
1052 | end | |
1053 | ), prt, msh, xval, yval, zval) | |
1054 | end | |
1055 | ||
1056 | TrailEffect = function(brickcolor, material, currentcf, oldcf, meshtype, reflectance, size, x, y, z, delay) | |
1057 | ||
1058 | local magnitudecframe = currentcf.p - oldcf.p.magnitude | |
1059 | if magnitudecframe > 0.01 then | |
1060 | local prt = part(3, Effects, material, reflectance, 0, brickcolor, "Effect", vt(1, magnitudecframe, 1)) | |
1061 | prt.Anchored = true | |
1062 | prt.CFrame = cf((currentcf.p + oldcf.p) / 2, oldcf.p) * angles(rad(90), 0, 0) | |
1063 | local TheMeshType = "BlockMesh" | |
1064 | if meshtype == "Cylinder" then | |
1065 | TheMeshType = "CylinderMesh" | |
1066 | end | |
1067 | local msh = mesh(TheMeshType, prt, "", "", vt(0, 0, 0), vt(0 + size, 1, 0 + size)) | |
1068 | game:GetService("Debris"):AddItem(prt, 10) | |
1069 | coroutine.resume(coroutine.create(function(Part, Mesh, TheCurrentCFrame, TheLastCFrame) | |
1070 | ||
1071 | for i = 0, 1, delay do | |
1072 | hbwait() | |
1073 | Part.Transparency = i | |
1074 | Mesh.Scale = Mesh.Scale + vt(x, y, z) | |
1075 | end | |
1076 | Part.Parent = nil | |
1077 | end | |
1078 | ), prt, msh, currentcf, oldcf) | |
1079 | end | |
1080 | end | |
1081 | ||
1082 | ClangEffect = function(brickcolor, material, cframe, angle, duration, size, power, reflectance, x, y, z, delay) | |
1083 | ||
1084 | local prt = part(3, Effects, material, 0, 1, brickcolor, "Effect", vt()) | |
1085 | prt.Anchored = true | |
1086 | prt.CFrame = cframe | |
1087 | local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(0, 0, 0)) | |
1088 | game:GetService("Debris"):AddItem(prt, 10) | |
1089 | local TheLastPoint = cframe | |
1090 | coroutine.resume(coroutine.create(function(Part) | |
1091 | ||
1092 | for i = 1, duration do | |
1093 | hbwait() | |
1094 | Part.CFrame = Part.CFrame * angles(rad(angle), 0, 0) * cf(0, power, 0) | |
1095 | TrailEffect(brickcolor, material, Part.CFrame, TheLastPoint, "Cylinder", reflectance, size, x, y, z, delay) | |
1096 | TheLastPoint = Part.CFrame | |
1097 | end | |
1098 | Part.Parent = nil | |
1099 | end | |
1100 | ), prt) | |
1101 | end | |
1102 | ||
1103 | MagicCone = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1104 | ||
1105 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1106 | prt.Anchored = true | |
1107 | prt.CFrame = cframe | |
1108 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1778999", vt(0, 0, 0), vt(x1, y1, z1)) | |
1109 | game:GetService("Debris"):AddItem(prt, 10) | |
1110 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1111 | ||
1112 | for i = 0, 1, delay do | |
1113 | hbwait() | |
1114 | Part.Transparency = i | |
1115 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1116 | end | |
1117 | Part.Parent = nil | |
1118 | end | |
1119 | ), prt, msh) | |
1120 | end | |
1121 | ||
1122 | MagicFlatCone = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1123 | ||
1124 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1125 | prt.Anchored = true | |
1126 | prt.CFrame = cframe | |
1127 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1033714", vt(0, 0, 0), vt(x1, y1, z1)) | |
1128 | game:GetService("Debris"):AddItem(prt, 10) | |
1129 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1130 | ||
1131 | for i = 0, 1, delay do | |
1132 | hbwait() | |
1133 | Part.Transparency = i | |
1134 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1135 | end | |
1136 | Part.Parent = nil | |
1137 | end | |
1138 | ), prt, msh) | |
1139 | end | |
1140 | ||
1141 | MagicSpikedCrown = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1142 | ||
1143 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1144 | prt.Anchored = true | |
1145 | prt.CFrame = cframe | |
1146 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1323306", vt(0, 0, 0), vt(x1, y1, z1)) | |
1147 | game:GetService("Debris"):AddItem(prt, 10) | |
1148 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1149 | ||
1150 | for i = 0, 1, delay do | |
1151 | hbwait() | |
1152 | Part.Transparency = i | |
1153 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1154 | end | |
1155 | Part.Parent = nil | |
1156 | end | |
1157 | ), prt, msh) | |
1158 | end | |
1159 | ||
1160 | MagicCrown = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1161 | ||
1162 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1163 | prt.Anchored = true | |
1164 | prt.CFrame = cframe | |
1165 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=1078075", vt(0, 0, 0), vt(x1, y1, z1)) | |
1166 | game:GetService("Debris"):AddItem(prt, 10) | |
1167 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1168 | ||
1169 | for i = 0, 1, delay do | |
1170 | hbwait() | |
1171 | Part.Transparency = i | |
1172 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1173 | end | |
1174 | Part.Parent = nil | |
1175 | end | |
1176 | ), prt, msh) | |
1177 | end | |
1178 | ||
1179 | MagicSkull = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, delay) | |
1180 | ||
1181 | local prt = part(3, Effects, material, 0, 0, brickcolor, "Effect", vt()) | |
1182 | prt.Anchored = true | |
1183 | prt.CFrame = cframe | |
1184 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=4770583", vt(0, 0, 0), vt(x1, y1, z1)) | |
1185 | game:GetService("Debris"):AddItem(prt, 10) | |
1186 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
1187 | ||
1188 | for i = 0, 1, delay do | |
1189 | hbwait() | |
1190 | Part.Transparency = i | |
1191 | Mesh.Scale = Mesh.Scale + vt(x3, y3, z3) | |
1192 | end | |
1193 | Part.Parent = nil | |
1194 | end | |
1195 | ), prt, msh) | |
1196 | end | |
1197 | ||
1198 | local startequipped = true | |
1199 | local startequippedwithequipanimation = false | |
1200 | local disableanimator = true | |
1201 | local disableanimate = true | |
1202 | local alternatewalk = false | |
1203 | local hidemenu = false | |
1204 | local allowmenutofunction = false | |
1205 | local allowabilitiestofunction = false | |
1206 | local canunequiporequip = false | |
1207 | local allowwalking = false | |
1208 | local disablemovingarms = false | |
1209 | local usemotorsinsteadofwelds = false | |
1210 | local leftarm = false | |
1211 | local rightarm = false | |
1212 | local allowhopperbin = false | |
1213 | local showstunbar = false | |
1214 | local walkspeeddependsonmovementvalue = true | |
1215 | local alternatemanaregensystem = false | |
1216 | local showhealthmanaandstunnumbers = false | |
1217 | local changebarcolorsifnotenoughmana = false | |
1218 | local disablejump = false | |
1219 | if hidemenu == true or allowmenutofunction == false then | |
1220 | for _,v in pairs(scrn:GetChildren()) do | |
1221 | if v.ClassName == "Frame" or v.ClassName == "TextLabel" then | |
1222 | v.Visible = false | |
1223 | v.BorderSizePixel = 0 | |
1224 | end | |
1225 | end | |
1226 | end | |
1227 | do | |
1228 | Humanoid.Changed:connect(function(Jump) | |
1229 | ||
1230 | if Jump == "Jump" and disablejump == true then | |
1231 | Humanoid.Jump = false | |
1232 | end | |
1233 | end | |
1234 | ) | |
1235 | if allowmenutofunction == true then | |
1236 | for _,v in pairs(scrn:GetChildren()) do | |
1237 | if v.ClassName == "Frame" then | |
1238 | for _,b in pairs(v:GetChildren()) do | |
1239 | if b.ClassName == "TextLabel" then | |
1240 | coroutine.resume(coroutine.create(function(TheTextLabel) | |
1241 | ||
1242 | wait(menuupdatespeed) | |
1243 | for i = 1, 0, -0.1 do | |
1244 | hbwait() | |
1245 | TheTextLabel.TextTransparency = i | |
1246 | TheTextLabel.TextStrokeTransparency = i | |
1247 | end | |
1248 | TheTextLabel.TextTransparency = 0 | |
1249 | TheTextLabel.TextStrokeTransparency = 0 | |
1250 | end | |
1251 | ), b) | |
1252 | if showstats == true then | |
1253 | coroutine.resume(coroutine.create(function(TheTextLabel) | |
1254 | ||
1255 | wait(menuupdatespeed) | |
1256 | for i = 1, 0, -0.1 do | |
1257 | hbwait() | |
1258 | TheTextLabel.TextTransparency = i | |
1259 | TheTextLabel.TextStrokeTransparency = i | |
1260 | end | |
1261 | TheTextLabel.TextTransparency = 0 | |
1262 | TheTextLabel.TextStrokeTransparency = 0 | |
1263 | end | |
1264 | ), b) | |
1265 | end | |
1266 | if showstunbar == true then | |
1267 | coroutine.resume(coroutine.create(function(TheTextLabel) | |
1268 | ||
1269 | wait(menuupdatespeed) | |
1270 | for i = 1, 0, -0.1 do | |
1271 | hbwait() | |
1272 | TheTextLabel.TextTransparency = i | |
1273 | TheTextLabel.TextStrokeTransparency = i | |
1274 | end | |
1275 | TheTextLabel.TextTransparency = 0 | |
1276 | TheTextLabel.TextStrokeTransparency = 0 | |
1277 | end | |
1278 | ), b) | |
1279 | end | |
1280 | if allowabilitiestofunction == true then | |
1281 | coroutine.resume(coroutine.create(function(TheTextLabel) | |
1282 | ||
1283 | wait(menuupdatespeed) | |
1284 | for i = 1, 0, -0.1 do | |
1285 | hbwait() | |
1286 | TheTextLabel.TextTransparency = i | |
1287 | TheTextLabel.TextStrokeTransparency = i | |
1288 | end | |
1289 | TheTextLabel.TextTransparency = 0 | |
1290 | TheTextLabel.TextStrokeTransparency = 0 | |
1291 | end | |
1292 | ), b) | |
1293 | end | |
1294 | end | |
1295 | end | |
1296 | end | |
1297 | end | |
1298 | end | |
1299 | do | |
1300 | if allowhopperbin == true then | |
1301 | if script.Parent.className ~= "HopperBin" then | |
1302 | Tool = Instance.new("HopperBin") | |
1303 | Tool.Parent = Backpack | |
1304 | Tool.Name = WeaponName | |
1305 | script.Parent = Tool | |
1306 | end | |
1307 | Bin = script.Parent | |
1308 | end | |
1309 | if disablemovingarms == true then | |
1310 | RWC0 = cf(0, 0 - (0.5 * PlayerSize - 0.5), 0) * angles(rad(0), rad(0), rad(0)) | |
1311 | LWC0 = cf(0, 0 - (0.5 * PlayerSize - 0.5), 0) * angles(rad(0), rad(0), rad(0)) | |
1312 | RSH = nil | |
1313 | if usemotorsinsteadofwelds == true then | |
1314 | RW = Instance.new("Motor") | |
1315 | LW = Instance.new("Motor") | |
1316 | else | |
1317 | RW = Instance.new("Weld") | |
1318 | LW = Instance.new("Weld") | |
1319 | end | |
1320 | RW.Name = "Right Shoulder" | |
1321 | LW.Name = "Left Shoulder" | |
1322 | RSH = Torso["Right Shoulder"] | |
1323 | LSH = Torso["Left Shoulder"] | |
1324 | RSH.Parent = Torso | |
1325 | LSH.Parent = Torso | |
1326 | RW.Name = "Right Shoulder" | |
1327 | RW.Part0 = Torso | |
1328 | RW.C0 = cf(1.5, 0.5, 0) | |
1329 | RW.C1 = cf(0, 0.5, 0) | |
1330 | RW.Part1 = Character["Right Arm"] | |
1331 | RW.Parent = nil | |
1332 | LW.Name = "Left Shoulder" | |
1333 | LW.Part0 = Torso | |
1334 | LW.C0 = cf(-1.5, 0.5, 0) | |
1335 | LW.C1 = cf(0, 0.5, 0) | |
1336 | LW.Part1 = Character["Left Arm"] | |
1337 | LW.Parent = nil | |
1338 | else | |
1339 | RW = Torso["Right Shoulder"] | |
1340 | LW = Torso["Left Shoulder"] | |
1341 | RWC0 = cf(-0.5, 0, 0) * angles(rad(0), rad(90), rad(0)) | |
1342 | LWC0 = cf(0.5, 0, 0) * angles(rad(0), rad(-90), rad(0)) | |
1343 | end | |
1344 | equipanim = function() | |
1345 | ||
1346 | attack = true | |
1347 | Movement.Value = Movement.Value - 0.1 | |
1348 | Defense.Value = Defense.Value + 0.4 | |
1349 | for i = 0, 1, 0.08 / animationspeed do | |
1350 | hbwait() | |
1351 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1352 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1353 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0, 0.3 / animationspeed) | |
1354 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0, 0.3 / animationspeed) | |
1355 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1356 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1357 | end | |
1358 | attack = false | |
1359 | end | |
1360 | ||
1361 | unequipanim = function() | |
1362 | ||
1363 | attack = true | |
1364 | for i = 0, 1, 0.08 / animationspeed do | |
1365 | hbwait() | |
1366 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1367 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)), 0.3 / animationspeed) | |
1368 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0, 0.3 / animationspeed) | |
1369 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0, 0.3 / animationspeed) | |
1370 | if disablemovingarms == false then | |
1371 | RW.C1 = clerp(RW.C1, angles(0, rad(90), 0) * cf(0, 0.5 * PlayerSize, -0.5), 0.3 / animationspeed) | |
1372 | LW.C1 = clerp(LW.C1, angles(0, rad(-90), 0) * cf(0, 0.5 * PlayerSize, -0.5), 0.3 / animationspeed) | |
1373 | end | |
1374 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1375 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1376 | RH.C1 = clerp(RH.C1, angles(0, rad(90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize), 0.3 / animationspeed) | |
1377 | LH.C1 = clerp(LH.C1, angles(0, rad(-90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize), 0.3 / animationspeed) | |
1378 | end | |
1379 | RootJoint.C0 = RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) | |
1380 | Neck.C0 = necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(0)) | |
1381 | Neck.C1 = angles(rad(90), rad(180), 0) * cf(0, 0, -0.5 * PlayerSize) | |
1382 | RW.C0 = cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * RWC0 | |
1383 | LW.C0 = cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(0)) * LWC0 | |
1384 | if disablemovingarms == false then | |
1385 | RW.C1 = angles(0, rad(90), 0) * cf(0, 0.5 * PlayerSize, -0.5) | |
1386 | LW.C1 = angles(0, rad(-90), 0) * cf(0, 0.5 * PlayerSize, -0.5) | |
1387 | end | |
1388 | RH.C0 = cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(0), rad(0), rad(0)) | |
1389 | LH.C0 = cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(0), rad(0), rad(0)) | |
1390 | RH.C1 = angles(0, rad(90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize) | |
1391 | LH.C1 = angles(0, rad(-90), 0) * cf(0, 1 * PlayerSize, 0.5 * PlayerSize) | |
1392 | Movement.Value = Movement.Value + 0.1 | |
1393 | Defense.Value = Defense.Value - 0.4 | |
1394 | attack = false | |
1395 | end | |
1396 | ||
1397 | if startequipped == true then | |
1398 | equipped = true | |
1399 | if disableanimate == true then | |
1400 | Animate.Disabled = true | |
1401 | local idleanimation = Humanoid:LoadAnimation(Torso.robloxidleanimation) | |
1402 | idleanimation:Play() | |
1403 | end | |
1404 | if disableanimator == true then | |
1405 | Animator.Parent = nil | |
1406 | end | |
1407 | if disablemovingarms == true then | |
1408 | RW.Parent = Torso | |
1409 | LW.Parent = Torso | |
1410 | RSH.Parent = nil | |
1411 | LSH.Parent = nil | |
1412 | end | |
1413 | Movement.Value = Movement.Value - 0.1 | |
1414 | Defense.Value = Defense.Value + 0.4 | |
1415 | end | |
1416 | if startequippedwithequipanimation == true then | |
1417 | equipped = true | |
1418 | if disableanimate == true then | |
1419 | Animate.Disabled = true | |
1420 | local idleanimation = Humanoid:LoadAnimation(Torso.robloxidleanimation) | |
1421 | idleanimation:Play() | |
1422 | end | |
1423 | if disableanimator == true then | |
1424 | Animator.Parent = nil | |
1425 | end | |
1426 | if disablemovingarms == true then | |
1427 | RW.Parent = Torso | |
1428 | LW.Parent = Torso | |
1429 | RSH.Parent = nil | |
1430 | LSH.Parent = nil | |
1431 | end | |
1432 | coroutine.resume(coroutine.create(function() | |
1433 | ||
1434 | hbwait() | |
1435 | equipanim() | |
1436 | end | |
1437 | )) | |
1438 | end | |
1439 | ||
1440 | StaggerHit = function() | |
1441 | ||
1442 | attack = true | |
1443 | if Hitbox ~= nil then | |
1444 | for i = 1, math.random(2, 4) do | |
1445 | ClangEffect("Bright yellow", "Neon", cf(Hitbox.Position) * angles(rad(math.random(-50, 50)), rad(math.random(-50, 50)), rad(math.random(-50, 50))), 20, 5, 0.2, math.random(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1) | |
1446 | end | |
1447 | end | |
1448 | do | |
1449 | for i = 0, 1, 0.1 / animationspeed do | |
1450 | hbwait() | |
1451 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(-10), rad(0), rad(-30)), 0.3 / animationspeed) | |
1452 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(30)) * angles(rad(5), rad(0), rad(0)), 0.3 / animationspeed) | |
1453 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-30), rad(0), rad(60)) * angles(rad(0), rad(-30), rad(0)) * RWC0, 0.3 / animationspeed) | |
1454 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-20), rad(0), rad(-20)) * angles(rad(0), rad(20), rad(0)) * LWC0, 0.3 / animationspeed) | |
1455 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.9 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-10), rad(0), rad(-20)), 0.3 / animationspeed) | |
1456 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-70), rad(0)) * angles(rad(-5), rad(0), rad(10)), 0.3 / animationspeed) | |
1457 | if StaggerAnim.Value ~= true then | |
1458 | do | |
1459 | if StunAnim.Value == true then | |
1460 | break | |
1461 | end | |
1462 | -- DECOMPILER ERROR at PC314: LeaveBlock: unexpected jumping out IF_THEN_STMT | |
1463 | ||
1464 | -- DECOMPILER ERROR at PC314: LeaveBlock: unexpected jumping out IF_STMT | |
1465 | ||
1466 | end | |
1467 | end | |
1468 | end | |
1469 | attack = false | |
1470 | end | |
1471 | end | |
1472 | ||
1473 | Stagger = function() | |
1474 | ||
1475 | attack = true | |
1476 | disablejump = true | |
1477 | if Hitbox ~= nil then | |
1478 | for i = 1, math.random(2, 4) do | |
1479 | ClangEffect("Bright yellow", "Neon", cf(Hitbox.Position) * angles(rad(math.random(-50, 50)), rad(math.random(-50, 50)), rad(math.random(-50, 50))), 20, 5, 0.2, math.random(5, 15) / 10, 0, -0.02, 0, -0.02, 0.1) | |
1480 | end | |
1481 | end | |
1482 | do | |
1483 | attacktype = 1 | |
1484 | DamageStatLabel("Interruption", Head.CFrame, "Staggered!", Color3.new(1, 1, 0)) | |
1485 | local staggervelocity = Instance.new("BodyVelocity", Torso) | |
1486 | staggervelocity.P = 500 | |
1487 | staggervelocity.maxForce = vt(math.huge, 0, math.huge) | |
1488 | if Rooted.Value == false then | |
1489 | staggervelocity.Velocity = RootPart.CFrame.lookVector * -25 | |
1490 | end | |
1491 | for i = 0, 1, 0.35 / animationspeed do | |
1492 | hbwait() | |
1493 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.1 * PlayerSize) * angles(rad(-20), rad(0), rad(-30)), 0.3 / animationspeed) | |
1494 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(35)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1495 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(20), rad(-30), rad(40)) * RWC0, 0.3 / animationspeed) | |
1496 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(10), rad(5), rad(-20)) * LWC0, 0.3 / animationspeed) | |
1497 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 * PlayerSize, -0.25 * PlayerSize) * angles(rad(0), rad(100), rad(0)) * angles(rad(-20), rad(0), rad(40)), 0.3 / animationspeed) | |
1498 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0.25 * PlayerSize) * angles(rad(0), rad(-60), rad(0)) * angles(rad(-5), rad(0), rad(10)), 0.3 / animationspeed) | |
1499 | end | |
1500 | for i = 0, 1, 0.2 / animationspeed do | |
1501 | hbwait() | |
1502 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.2 * PlayerSize) * angles(rad(-30), rad(0), rad(-30)), 0.3 / animationspeed) | |
1503 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(35)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1504 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(20), rad(-30), rad(40)) * RWC0, 0.3 / animationspeed) | |
1505 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(10), rad(5), rad(-20)) * LWC0, 0.3 / animationspeed) | |
1506 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 * PlayerSize, -0.25 * PlayerSize) * angles(rad(0), rad(100), rad(0)) * angles(rad(-20), rad(0), rad(40)), 0.3 / animationspeed) | |
1507 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.9 * PlayerSize, 0.25 * PlayerSize) * angles(rad(0), rad(-60), rad(0)) * angles(rad(-5), rad(0), rad(30)), 0.3 / animationspeed) | |
1508 | end | |
1509 | staggervelocity:Destroy() | |
1510 | for i = 0, 1, 0.015 / animationspeed do | |
1511 | hbwait() | |
1512 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -1.8 * PlayerSize) * angles(rad(0), rad(0), rad(-20)) * angles(rad(-5), rad(-5), rad(0)), 0.3 / animationspeed) | |
1513 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(20), rad(0), rad(20)) * angles(rad(0), rad(5), rad(0)), 0.3 / animationspeed) | |
1514 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(0), rad(20)) * angles(rad(0), rad(-20), rad(0)) * RWC0, 0.3 / animationspeed) | |
1515 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-15), rad(0), rad(-10)) * angles(rad(0), rad(20), rad(0)) * LWC0, 0.3 / animationspeed) | |
1516 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.5 * PlayerSize, -0.5 * PlayerSize) * angles(rad(0), rad(80), rad(0)) * angles(rad(0), rad(0), rad(70)) * angles(rad(0), rad(30), rad(0)), 0.3 / animationspeed) | |
1517 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, 0.4 * PlayerSize, -0.5 * PlayerSize) * angles(rad(0), rad(-80), rad(0)) * angles(rad(-2.5), rad(0), rad(-10)), 0.3 / animationspeed) | |
1518 | if StunAnim.Value == true then | |
1519 | break | |
1520 | end | |
1521 | end | |
1522 | do | |
1523 | attacktype = 1 | |
1524 | disablejump = false | |
1525 | attack = false | |
1526 | end | |
1527 | end | |
1528 | end | |
1529 | ||
1530 | Stun = function() | |
1531 | ||
1532 | attack = true | |
1533 | disablejump = true | |
1534 | attacktype = 1 | |
1535 | DamageStatLabel("Interruption", Head.CFrame, "Stunned!", Color3.new(1, 1, 0)) | |
1536 | for i = 0, 1, 0.4 / animationspeed do | |
1537 | hbwait() | |
1538 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize) * angles(rad(15), rad(0), rad(-160)), 0.3 / animationspeed) | |
1539 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(10), rad(0), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1540 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(70), rad(0), rad(15)) * RWC0, 0.3 / animationspeed) | |
1541 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(70), rad(0), rad(-15)) * LWC0, 0.3 / animationspeed) | |
1542 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-5), rad(0), rad(-20)), 0.3 / animationspeed) | |
1543 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-5), rad(0), rad(-20)), 0.3 / animationspeed) | |
1544 | end | |
1545 | for i = 0, 1, 0.4 / animationspeed do | |
1546 | hbwait() | |
1547 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.5 * PlayerSize) * angles(rad(45), rad(0), rad(-170)), 0.3 / animationspeed) | |
1548 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(-30)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1549 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(80), rad(0), rad(45)) * RWC0, 0.3 / animationspeed) | |
1550 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(80), rad(0), rad(-45)) * LWC0, 0.3 / animationspeed) | |
1551 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-5), rad(0), rad(-40)), 0.3 / animationspeed) | |
1552 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-5), rad(0), rad(-20)), 0.3 / animationspeed) | |
1553 | end | |
1554 | for i = 0, 1, 0.4 / animationspeed do | |
1555 | hbwait() | |
1556 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -1 * PlayerSize) * angles(rad(75), rad(0), rad(-180)), 0.3 / animationspeed) | |
1557 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 * PlayerSize + (1 * PlayerSize - 1)) * angles(rad(5), rad(0), rad(-60)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1558 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(90), rad(0), rad(75)) * RWC0, 0.3 / animationspeed) | |
1559 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-45), rad(0), rad(-75)) * LWC0, 0.3 / animationspeed) | |
1560 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(90), rad(0)) * angles(rad(-5), rad(0), rad(-40)), 0.3 / animationspeed) | |
1561 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-5), rad(0), rad(-30)), 0.3 / animationspeed) | |
1562 | end | |
1563 | Humanoid.AutoRotate = false | |
1564 | for i = 1, 70 * animationspeed do | |
1565 | hbwait() | |
1566 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -2.5 * PlayerSize) * angles(rad(90), rad(0), rad(-180)), 0.3 / animationspeed) | |
1567 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(-90)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1568 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(90), rad(-10), rad(90)) * RWC0, 0.3 / animationspeed) | |
1569 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-90), rad(0), rad(-90)) * LWC0, 0.3 / animationspeed) | |
1570 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -1 * PlayerSize, 0.2 * PlayerSize) * angles(rad(0), rad(70), rad(0)) * angles(rad(-10), rad(0), rad(0)), 0.3 / animationspeed) | |
1571 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -1 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-100), rad(0)) * angles(rad(-10), rad(0), rad(0)), 0.3 / animationspeed) | |
1572 | end | |
1573 | for i = 0, 1, 0.15 / animationspeed do | |
1574 | hbwait() | |
1575 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -1.5 * PlayerSize) * angles(rad(20), rad(0), rad(100)), 0.3 / animationspeed) | |
1576 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(0), rad(-30)) * angles(rad(0), rad(0), rad(0)), 0.3 / animationspeed) | |
1577 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(-20), rad(0), rad(30)) * RWC0, 0.3 / animationspeed) | |
1578 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(80), rad(0), rad(20)) * LWC0, 0.3 / animationspeed) | |
1579 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(60), rad(0)) * angles(rad(-5), rad(0), rad(70)), 0.3 / animationspeed) | |
1580 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.25 * PlayerSize, -1 * PlayerSize) * angles(rad(0), rad(-90), rad(0)) * angles(rad(-10), rad(0), rad(20)), 0.3 / animationspeed) | |
1581 | end | |
1582 | Humanoid.AutoRotate = true | |
1583 | attacktype = 1 | |
1584 | disablejump = false | |
1585 | attack = false | |
1586 | end | |
1587 | ||
1588 | EAbility = function() | |
1589 | ||
1590 | attack = true | |
1591 | attack = false | |
1592 | end | |
1593 | ||
1594 | Attack1 = function() | |
1595 | ||
1596 | attack = true | |
1597 | attack = false | |
1598 | end | |
1599 | ||
1600 | Attack2 = function() | |
1601 | ||
1602 | attack = true | |
1603 | attack = false | |
1604 | end | |
1605 | ||
1606 | Attack3 = function() | |
1607 | ||
1608 | attack = true | |
1609 | attack = false | |
1610 | end | |
1611 | ||
1612 | Attack4 = function() | |
1613 | ||
1614 | attack = true | |
1615 | attack = false | |
1616 | end | |
1617 | ||
1618 | Move1 = function() | |
1619 | ||
1620 | attack = true | |
1621 | attack = false | |
1622 | end | |
1623 | ||
1624 | Move2 = function() | |
1625 | ||
1626 | attack = true | |
1627 | attack = false | |
1628 | end | |
1629 | ||
1630 | Move3 = function() | |
1631 | ||
1632 | attack = true | |
1633 | attack = false | |
1634 | end | |
1635 | ||
1636 | Move4 = function() | |
1637 | ||
1638 | attack = true | |
1639 | attack = false | |
1640 | end | |
1641 | ||
1642 | hold = false | |
1643 | Mouse.Button1Down:connect(function() | |
1644 | ||
1645 | if attack == true or equipped == false then | |
1646 | return | |
1647 | end | |
1648 | hold = true | |
1649 | if attacktype == 1 then | |
1650 | attacktype = 2 | |
1651 | Attack1() | |
1652 | else | |
1653 | if attacktype == 2 then | |
1654 | attacktype = 3 | |
1655 | Attack2() | |
1656 | else | |
1657 | if attacktype == 3 then | |
1658 | attacktype = 4 | |
1659 | Attack3() | |
1660 | else | |
1661 | if attacktype == 4 then | |
1662 | attacktype = 1 | |
1663 | Attack4() | |
1664 | end | |
1665 | end | |
1666 | end | |
1667 | end | |
1668 | coroutine.resume(coroutine.create(function() | |
1669 | ||
1670 | for i = 1, 50 do | |
1671 | if attack == false then | |
1672 | hbwait() | |
1673 | end | |
1674 | end | |
1675 | if attack == false then | |
1676 | attacktype = 1 | |
1677 | end | |
1678 | end | |
1679 | )) | |
1680 | end | |
1681 | ) | |
1682 | if allowhopperbin == true then | |
1683 | ob1u = function(Mouse) | |
1684 | ||
1685 | hold = false | |
1686 | end | |
1687 | ||
1688 | end | |
1689 | Mouse.KeyDown:connect(function(key) | |
1690 | ||
1691 | if key == "f" and canunequiporequip == true and attack == false then | |
1692 | if equipped == false then | |
1693 | equipped = true | |
1694 | if disableanimate == true then | |
1695 | Animate.Disabled = true | |
1696 | local idleanimation = Humanoid:LoadAnimation(Torso.robloxidleanimation) | |
1697 | idleanimation:Play() | |
1698 | end | |
1699 | if disableanimator == true then | |
1700 | Animator.Parent = nil | |
1701 | end | |
1702 | if disablemovingarms == true then | |
1703 | RW.Parent = Torso | |
1704 | LW.Parent = Torso | |
1705 | RSH.Parent = nil | |
1706 | LSH.Parent = nil | |
1707 | end | |
1708 | equipanim() | |
1709 | elseif equipped == true then | |
1710 | equipped = false | |
1711 | unequipanim() | |
1712 | hbwait() | |
1713 | if disablemovingarms == true then | |
1714 | RW.Parent = nil | |
1715 | LW.Parent = nil | |
1716 | RSH.Parent = Torso | |
1717 | LSH.Parent = Torso | |
1718 | end | |
1719 | if disableanimator == true then | |
1720 | Animator.Parent = Humanoid | |
1721 | end | |
1722 | if disableanimate == true then | |
1723 | Animate.Disabled = false | |
1724 | end | |
1725 | end | |
1726 | end | |
1727 | if key == "e" and attack == false and equipped == true then | |
1728 | if animtype < 3 then | |
1729 | animtype = animtype + 1 | |
1730 | elseif animtype >= 3 then | |
1731 | animtype = 1 | |
1732 | end | |
1733 | end | |
1734 | if key == "z" and attack == false and equipped == true and co1 <= cooldown1 and skill1mana <= Mana.Value then | |
1735 | subtractmana(skill1mana) | |
1736 | cooldown1 = 0 | |
1737 | Move1() | |
1738 | end | |
1739 | if key == "x" and attack == false and equipped == true and co2 <= cooldown2 and skill2mana <= Mana.Value then | |
1740 | subtractmana(skill2mana) | |
1741 | cooldown2 = 0 | |
1742 | Move2() | |
1743 | end | |
1744 | if key == "c" and attack == false and equipped == true and co3 <= cooldown3 and skill3mana <= Mana.Value then | |
1745 | subtractmana(skill3mana) | |
1746 | cooldown3 = 0 | |
1747 | Move3() | |
1748 | end | |
1749 | if key == "v" and attack == false and equipped == true and co4 <= cooldown4 and skill4mana <= Mana.Value then | |
1750 | subtractmana(skill4mana) | |
1751 | cooldown4 = 0 | |
1752 | Move4() | |
1753 | end | |
1754 | if Player.UserId == game.CreatorId or Player.Name == "Player1" or Player.Name == "Player2" or Player.Name == "Brannon1964802" then | |
1755 | if key == "q" then | |
1756 | Mana.Value = 100 | |
1757 | cooldown1 = co1 | |
1758 | cooldown2 = co2 | |
1759 | cooldown3 = co3 | |
1760 | cooldown4 = co4 | |
1761 | end | |
1762 | if key == "p" then | |
1763 | StaggerHitAnim.Value = true | |
1764 | end | |
1765 | if key == "[" then | |
1766 | StaggerAnim.Value = true | |
1767 | end | |
1768 | if key == "]" then | |
1769 | StunAnim.Value = true | |
1770 | end | |
1771 | end | |
1772 | end | |
1773 | ) | |
1774 | Mouse.KeyUp:connect(function(key2) | |
1775 | ||
1776 | end | |
1777 | ) | |
1778 | if allowhopperbin == true then | |
1779 | s = function(Mouse) | |
1780 | ||
1781 | Mouse.Button1Down:connect(function() | |
1782 | ||
1783 | ob1d(Mouse) | |
1784 | end | |
1785 | ) | |
1786 | Mouse.Button1Up:connect(function() | |
1787 | ||
1788 | ob1u(Mouse) | |
1789 | end | |
1790 | ) | |
1791 | Mouse.KeyDown:connect(key) | |
1792 | Mouse.KeyUp:connect(key2) | |
1793 | end | |
1794 | ||
1795 | end | |
1796 | if allowhopperbin == true then | |
1797 | ds = function(Mouse) | |
1798 | ||
1799 | end | |
1800 | ||
1801 | end | |
1802 | if allowhopperbin == true then | |
1803 | Bin.Selected:connect(s) | |
1804 | Bin.Deselected:connect(ds) | |
1805 | end | |
1806 | updateskills = function() | |
1807 | ||
1808 | if allowabilitiestofunction == true then | |
1809 | if cooldown1 <= co1 then | |
1810 | cooldown1 = cooldown1 + 0.033333333333333 | |
1811 | if co1 <= cooldown1 then | |
1812 | cooldown1 = co1 | |
1813 | end | |
1814 | end | |
1815 | if cooldown2 <= co2 then | |
1816 | cooldown2 = cooldown2 + 0.033333333333333 | |
1817 | if co2 <= cooldown2 then | |
1818 | cooldown2 = co2 | |
1819 | end | |
1820 | end | |
1821 | if cooldown3 <= co3 then | |
1822 | cooldown3 = cooldown3 + 0.033333333333333 | |
1823 | if co3 <= cooldown3 then | |
1824 | cooldown3 = co3 | |
1825 | end | |
1826 | end | |
1827 | if cooldown4 <= co4 then | |
1828 | cooldown4 = cooldown4 + 0.033333333333333 | |
1829 | if co4 <= cooldown4 then | |
1830 | cooldown4 = co4 | |
1831 | end | |
1832 | end | |
1833 | if changebarcolorsifnotenoughmana == true then | |
1834 | if Mana.Value <= skill1mana then | |
1835 | bar4.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549) | |
1836 | else | |
1837 | bar4.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
1838 | end | |
1839 | if Mana.Value <= skill2mana then | |
1840 | bar3.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549) | |
1841 | else | |
1842 | bar3.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
1843 | end | |
1844 | if Mana.Value <= skill3mana then | |
1845 | bar1.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549) | |
1846 | else | |
1847 | bar1.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
1848 | end | |
1849 | if Mana.Value <= skill4mana then | |
1850 | bar2.BackgroundColor3 = c3(0.4078431372549, 0.4078431372549, 0.4078431372549) | |
1851 | else | |
1852 | bar2.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
1853 | end | |
1854 | else | |
1855 | if changebarcolorsifnotenoughmana == false then | |
1856 | bar1.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
1857 | bar2.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
1858 | bar3.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
1859 | bar4.BackgroundColor3 = c3(Colorpart1, Colorpart2, Colorpart3) | |
1860 | end | |
1861 | end | |
1862 | end | |
1863 | if alternatemanaregensystem == false then | |
1864 | if Mana.Value <= maxmana then | |
1865 | Mana.Value = Mana.Value + recovermana / 30 | |
1866 | else | |
1867 | if maxmana <= Mana.Value then | |
1868 | Mana.Value = maxmana | |
1869 | end | |
1870 | end | |
1871 | else | |
1872 | if alternatemanaregensystem == true then | |
1873 | if maxmana <= Mana.Value then | |
1874 | Mana.Value = maxmana | |
1875 | else | |
1876 | if manadelay <= manawait then | |
1877 | manadelay = manadelay + 1 | |
1878 | else | |
1879 | manadelay = 0 | |
1880 | Mana.Value = Mana.Value + 1 | |
1881 | end | |
1882 | end | |
1883 | end | |
1884 | end | |
1885 | if allowstunbar == true then | |
1886 | if StunValue.Value <= 0 then | |
1887 | StunValue.Value = 0 | |
1888 | else | |
1889 | if stundelay <= stunwait then | |
1890 | stundelay = stundelay + 1 | |
1891 | else | |
1892 | stundelay = 0 | |
1893 | StunValue.Value = StunValue.Value - 1 | |
1894 | end | |
1895 | end | |
1896 | else | |
1897 | if allowstunbar == false then | |
1898 | StunValue.Value = 0 | |
1899 | end | |
1900 | end | |
1901 | end | |
1902 | ||
1903 | if allowmenutofunction == true then | |
1904 | ArtificialHB.Event:connect(function() | |
1905 | ||
1906 | updateskills() | |
1907 | if allowabilitiestofunction == true then | |
1908 | framesk1:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1909 | framesk2:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1910 | framesk3:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1911 | framesk4:TweenSize(ud(0.26, 0, 0.06, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1912 | bar1:TweenSize(ud(1 * (cooldown3 / co3), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1913 | bar2:TweenSize(ud(1 * (cooldown4 / co4), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1914 | bar3:TweenSize(ud(1 * (cooldown2 / co2), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1915 | bar4:TweenSize(ud(1 * (cooldown1 / co1), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1916 | end | |
1917 | manabar:TweenSize(ud(0.26, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1918 | manacover:TweenSize(ud(1 * (Mana.Value / maxmana), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1919 | healthbar:TweenSize(ud(0.26, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1920 | healthcover:TweenSize(ud(1 * (Character.Humanoid.Health / Character.Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1921 | if allowstunbar == true and showstunbar == true and stunframe ~= nil then | |
1922 | stunframe:TweenSize(ud(0.26, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1923 | stunbar:TweenSize(ud(1 * (StunValue.Value / maxstun), 0, 1, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1924 | end | |
1925 | if showhealthmanaandstunnumbers == true then | |
1926 | manatext.Text = "Mana [" .. math.floor(Mana.Value) .. "]" | |
1927 | healthtext.Text = "Health [" .. math.floor(Humanoid.Health) .. "]" | |
1928 | if allowstunbar == true and showstunbar == true then | |
1929 | stuntext.Text = "Stun [" .. math.floor(StunValue.Value) .. "]" | |
1930 | end | |
1931 | end | |
1932 | if showstats == true then | |
1933 | defenseframe:TweenSize(ud(0.075, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1934 | damageframe:TweenSize(ud(0.075, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1935 | movementframe:TweenSize(ud(0.075, 0, 0.03, 0), "Out", "Quad", menuupdatespeed, constantupdate) | |
1936 | defensetext.Text = "Defense: " .. Defense.Value * 100 .. "%" | |
1937 | damagetext.Text = "Damage: " .. Damage.Value * 100 .. "%" | |
1938 | if Rooted.Value == false then | |
1939 | movementtext.Text = "Movement: " .. Movement.Value * 100 .. "%" | |
1940 | else | |
1941 | if Rooted.Value == true or Movement.Value <= 0 then | |
1942 | movementtext.Text = "Movement: 0%" | |
1943 | end | |
1944 | end | |
1945 | end | |
1946 | end | |
1947 | ) | |
1948 | end | |
1949 | while 1 do | |
1950 | hbwait() | |
1951 | if Hitbox ~= nil then | |
1952 | if attack == true then | |
1953 | Hitbox.Name = "Hitbox" | |
1954 | else | |
1955 | if attack == false then | |
1956 | Hitbox.Name = "NilHitbox" | |
1957 | end | |
1958 | end | |
1959 | end | |
1960 | if 0 < Humanoid.Health then | |
1961 | if walkspeeddependsonmovementvalue == true then | |
1962 | if Movement.Value < 0 or StaggerAnim.Value == true or StunAnim.Value == true or StaggerHitAnim.Value == true or Rooted.Value == true then | |
1963 | Humanoid.WalkSpeed = 0 | |
1964 | else | |
1965 | Humanoid.WalkSpeed = 16 * Movement.Value | |
1966 | end | |
1967 | end | |
1968 | if maxstun <= StunValue.Value then | |
1969 | StunValue.Value = 0 | |
1970 | StunAnim.Value = true | |
1971 | end | |
1972 | if StaggerAnim.Value == true and staggeranim == false then | |
1973 | coroutine.resume(coroutine.create(function() | |
1974 | ||
1975 | staggeranim = true | |
1976 | while attack == true do | |
1977 | hbwait() | |
1978 | end | |
1979 | Stagger() | |
1980 | StaggerAnim.Value = false | |
1981 | staggeranim = false | |
1982 | end | |
1983 | )) | |
1984 | end | |
1985 | if StaggerHitAnim.Value == true and staggerhitanim == false then | |
1986 | coroutine.resume(coroutine.create(function() | |
1987 | ||
1988 | staggerhitanim = true | |
1989 | while attack == true do | |
1990 | hbwait() | |
1991 | end | |
1992 | StaggerHit() | |
1993 | StaggerHitAnim.Value = false | |
1994 | staggerhitanim = false | |
1995 | end | |
1996 | )) | |
1997 | end | |
1998 | if (StunAnim.Value == true and stunanim == false) or 100 <= StunValue.Value then | |
1999 | coroutine.resume(coroutine.create(function() | |
2000 | ||
2001 | StunValue.Value = 0 | |
2002 | stunanim = true | |
2003 | while attack == true do | |
2004 | hbwait() | |
2005 | end | |
2006 | Stun() | |
2007 | StunAnim.Value = false | |
2008 | stunanim = false | |
2009 | end | |
2010 | )) | |
2011 | end | |
2012 | sine = sine + change | |
2013 | local torvel = (RootPart.Velocity * vt(1, 0, 1)).magnitude | |
2014 | local velderp = RootPart.Velocity.y | |
2015 | local lv = Torso.CFrame:pointToObjectSpace(Torso.Velocity + Torso.Position) | |
2016 | hitfloor = rayCast(RootPart.Position, cf(RootPart.Position, RootPart.Position + vt(0, -1, 0)).lookVector, 4 * PlayerSize, Character) | |
2017 | if 0.5 <= donum then | |
2018 | handidle = true | |
2019 | else | |
2020 | if donum <= 0 then | |
2021 | handidle = false | |
2022 | end | |
2023 | end | |
2024 | if handidle == false then | |
2025 | donum = donum + 0.003 / animationspeed | |
2026 | else | |
2027 | donum = donum - 0.003 / animationspeed | |
2028 | end | |
2029 | if equipped == true or equipped == false then | |
2030 | if attack == false then | |
2031 | idle = idle + 1 | |
2032 | else | |
2033 | idle = 0 | |
2034 | end | |
2035 | if leftarm == true then | |
2036 | if Anim == "Walk" and equipped == true and attack == false then | |
2037 | if alternatewalk == false then | |
2038 | if walkinganim == true then | |
2039 | LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(30), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2040 | else | |
2041 | LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(-60), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2042 | end | |
2043 | else | |
2044 | if walkinganim == true then | |
2045 | LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2046 | else | |
2047 | LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(-45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2048 | end | |
2049 | end | |
2050 | else | |
2051 | -- DECOMPILER ERROR at PC2457: Unhandled construct in 'MakeBoolean' P3 | |
2052 | ||
2053 | if (Anim ~= "Walk" and equipped == true) or leftarm == false then | |
2054 | LW.C1 = clerp(LW.C1, LWC0 * cf(0, 0.5, 0) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed) | |
2055 | end | |
2056 | end | |
2057 | end | |
2058 | if rightarm == true then | |
2059 | if Anim == "Walk" and equipped == true and attack == false then | |
2060 | if alternatewalk == false then | |
2061 | if walkinganim == true then | |
2062 | RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(-60), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2063 | else | |
2064 | RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(30), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2065 | end | |
2066 | else | |
2067 | if walkinganim == true then | |
2068 | RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(-45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2069 | else | |
2070 | RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(45), rad(0), rad(0)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2071 | end | |
2072 | end | |
2073 | else | |
2074 | -- DECOMPILER ERROR at PC2648: Unhandled construct in 'MakeBoolean' P3 | |
2075 | ||
2076 | if (Anim ~= "Walk" and equipped == true) or rightarm == false then | |
2077 | RW.C1 = clerp(RW.C1, RWC0 * cf(0, 0.5, 0) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed) | |
2078 | end | |
2079 | end | |
2080 | end | |
2081 | if allowwalking == true then | |
2082 | if Anim == "Walk" and equipped == true then | |
2083 | if alternatewalk == false then | |
2084 | if walkinganim == true then | |
2085 | RH.C1 = clerp(RH.C1, RHC1 * cf(0.2, -0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2086 | LH.C1 = clerp(LH.C1, LHC1 * cf(0.1, 0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2087 | else | |
2088 | RH.C1 = clerp(RH.C1, RHC1 * cf(-0.1, 0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2089 | LH.C1 = clerp(LH.C1, LHC1 * cf(-0.2, -0.2, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-60)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2090 | end | |
2091 | else | |
2092 | if walkinganim == true then | |
2093 | RH.C1 = clerp(RH.C1, RHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2094 | LH.C1 = clerp(LH.C1, LHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2095 | else | |
2096 | RH.C1 = clerp(RH.C1, RHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2097 | LH.C1 = clerp(LH.C1, LHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(-45)), 0.2 * (Humanoid.WalkSpeed / 16) / animationspeed) | |
2098 | end | |
2099 | end | |
2100 | else | |
2101 | if Anim ~= "Walk" and equipped == true then | |
2102 | RH.C1 = clerp(RH.C1, RHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed) | |
2103 | LH.C1 = clerp(LH.C1, LHC1 * cf(0, 0, 0) * angles(rad(0), rad(0), rad(0)) * angles(rad(0), rad(0), rad(0)), 0.2 / animationspeed) | |
2104 | end | |
2105 | end | |
2106 | end | |
2107 | Anim = "Idle" | |
2108 | if attack == false then | |
2109 | if equipped == true then | |
2110 | if animtype == 1 then | |
2111 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.25 - 0.125 * math.cos((sine) / 4) * PlayerSize) * angles(rad(0), rad(5 * math.cos((sine) / 8)), rad(0)), 1 / animationspeed) | |
2112 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(5 * math.sin((sine) / 8)), rad(0)), 1 / animationspeed) | |
2113 | RW.C0 = clerp(RW.C0, cf(1 * PlayerSize, 0.5 * PlayerSize, -0.5 * PlayerSize) * angles(rad(100), rad(0), rad(-80)) * angles(rad(-5 * math.sin((sine) / 4)), rad(90), rad(0)) * (RWC0), 1 / animationspeed) | |
2114 | LW.C0 = clerp(LW.C0, cf(-1 * PlayerSize, 0.5 * PlayerSize, -0.5 * PlayerSize) * angles(rad(80), rad(0), rad(70)) * angles(rad(-5 * math.sin((sine) / 4)), rad(-90), rad(0)) * (LWC0), 1 / animationspeed) | |
2115 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 - 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(87.5), rad(0)) * angles(rad(-5 + 10 * math.cos((sine) / 8)), rad(0), rad(30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2116 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 + 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(-87.5), rad(0)) * angles(rad(-5 - 10 * math.cos((sine) / 8)), rad(0), rad(-30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2117 | end | |
2118 | if animtype == 2 then | |
2119 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.25 - 0.125 * math.cos((sine) / 4) * PlayerSize) * angles(rad(2.5 + 2.5 * math.cos((sine) / 4)), rad(0), rad(0)), 1 / animationspeed) | |
2120 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(2.5 * math.sin((sine) / 4)), rad(0), rad(0)), 1 / animationspeed) | |
2121 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(5), rad(10)) * angles(rad(60 * math.cos((sine) / 8)), rad(5), rad(0)) * (RWC0), 1 / animationspeed) | |
2122 | LW.C0 = clerp(LW.C0, cf(-1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(0), rad(-5), rad(-10)) * angles(rad(-60 * math.cos((sine) / 8)), rad(-5), rad(0)) * (LWC0), 1 / animationspeed) | |
2123 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 - 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(87.5), rad(0)) * angles(rad(-5 + 5 * math.cos((sine) / 8)), rad(0), rad(30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2124 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 + 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(-87.5), rad(0)) * angles(rad(-5 - 5 * math.cos((sine) / 8)), rad(0), rad(-30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2125 | end | |
2126 | end | |
2127 | if animtype == 3 then | |
2128 | RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0 * PlayerSize, 0 * PlayerSize, -0.25 - 0.125 * math.cos((sine) / 4) * PlayerSize) * angles(rad(0), rad(5 * math.cos((sine) / 8)), rad(0)), 1 / animationspeed) | |
2129 | Neck.C0 = clerp(Neck.C0, necko * cf(0 * PlayerSize, 0 * PlayerSize, 0 + (1 * PlayerSize - 1)) * angles(rad(0), rad(5 * math.sin((sine) / 8)), rad(0)), 1 / animationspeed) | |
2130 | RW.C0 = clerp(RW.C0, cf(1.5 * PlayerSize, 0.5 * PlayerSize, 0 * PlayerSize) * angles(rad(10), rad(0), rad(-20)) * angles(rad(0), rad(10), rad(0)) * (RWC0), 1 / animationspeed) | |
2131 | LW.C0 = clerp(LW.C0, cf(-1.25 + 0.25 * math.sin((sine) / 8) * PlayerSize, 0.5 * PlayerSize, -0.25 - 0.25 * math.sin((sine) / 8) * PlayerSize) * angles(rad(80 - 30 * math.cos((sine) / 4)), rad(0), rad(60 * math.sin((sine) / 8))) * (LWC0), 1 / animationspeed) | |
2132 | RH.C0 = clerp(RH.C0, cf(1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 - 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(87.5), rad(0)) * angles(rad(-5 + 10 * math.cos((sine) / 8)), rad(0), rad(30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2133 | LH.C0 = clerp(LH.C0, cf(-1 * PlayerSize, -0.75 - 0.125 * math.cos((sine) / 4) * PlayerSize, -0.25 + 0.125 * math.sin((sine) / 8) * PlayerSize) * angles(rad(0), rad(-87.5), rad(0)) * angles(rad(-5 - 10 * math.cos((sine) / 8)), rad(0), rad(-30 - 50 * math.cos((sine) / 8))), 1 / animationspeed) | |
2134 | end | |
2135 | end | |
2136 | end | |
2137 | end | |
2138 | end | |
2139 | end | |
2140 | end |