SHOW:
|
|
- or go back to the newest paste.
1 | --//====================================================\\-- | |
2 | --|| CREATED BY SHACKLUSTER | |
3 | --\\====================================================//-- | |
4 | ||
5 | ||
6 | ||
7 | wait(0.2) | |
8 | ||
9 | Instance.new("ForceField",game.Players.LocalPlayer.Character) | |
10 | Forcefield.Visible = false | |
11 | ||
12 | Player = game:GetService("Players").LocalPlayer | |
13 | PlayerGui = Player.PlayerGui | |
14 | Cam = workspace.CurrentCamera | |
15 | Backpack = Player.Backpack | |
16 | Character = Player.Character | |
17 | Humanoid = Character.Humanoid | |
18 | Mouse = Player:GetMouse() | |
19 | RootPart = Character["HumanoidRootPart"] | |
20 | Torso = Character["Torso"] | |
21 | Head = Character["Head"] | |
22 | RightArm = Character["Right Arm"] | |
23 | LeftArm = Character["Left Arm"] | |
24 | RightLeg = Character["Right Leg"] | |
25 | LeftLeg = Character["Left Leg"] | |
26 | RootJoint = RootPart["RootJoint"] | |
27 | Neck = Torso["Neck"] | |
28 | RightShoulder = Torso["Right Shoulder"] | |
29 | LeftShoulder = Torso["Left Shoulder"] | |
30 | RightHip = Torso["Right Hip"] | |
31 | LeftHip = Torso["Left Hip"] | |
32 | local sick = Instance.new("Sound",Character) | |
33 | sick.SoundId = "rbxassetid://1167151479" | |
34 | sick.Looped = true | |
35 | sick.Pitch = 1 | |
36 | sick.Volume = 1 | |
37 | sick:Play() | |
38 | ||
39 | local naeeym2 = Instance.new("BillboardGui",Character) | |
40 | naeeym2.AlwaysOnTop = true | |
41 | naeeym2.Size = UDim2.new(5,35,2,35) | |
42 | naeeym2.StudsOffset = Vector3.new(0,3,0) | |
43 | naeeym2.Adornee = Character.Head | |
44 | naeeym2.Name = "Name" | |
45 | --naeeym2.PlayerToHideFrom = Player | |
46 | naeeym2.MaxDistance = 200 | |
47 | local tecks2 = Instance.new("TextLabel",naeeym2) | |
48 | tecks2.BackgroundTransparency = 1 | |
49 | tecks2.TextScaled = true | |
50 | tecks2.BorderSizePixel = 0 | |
51 | tecks2.Text = "₱Ɽł₴₥" | |
52 | tecks2.Font = "SciFi" | |
53 | tecks2.TextSize = 30 | |
54 | tecks2.TextStrokeTransparency = 1 | |
55 | tecks2.TextColor3 = Color3.new(255,255,255) | |
56 | tecks2.TextStrokeColor3 = Color3.new(0,0,0) | |
57 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
58 | tecks2.Parent = naeeym2 | |
59 | ||
60 | IT = Instance.new | |
61 | CF = CFrame.new | |
62 | VT = Vector3.new | |
63 | RAD = math.rad | |
64 | C3 = Color3.new | |
65 | UD2 = UDim2.new | |
66 | BRICKC = BrickColor.new | |
67 | ANGLES = CFrame.Angles | |
68 | EULER = CFrame.fromEulerAnglesXYZ | |
69 | COS = math.cos | |
70 | ACOS = math.acos | |
71 | SIN = math.sin | |
72 | ASIN = math.asin | |
73 | ABS = math.abs | |
74 | MRANDOM = math.random | |
75 | FLOOR = math.floor | |
76 | ||
77 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
78 | local NEWMESH = IT(MESH) | |
79 | if MESH == "SpecialMesh" then | |
80 | NEWMESH.MeshType = MESHTYPE | |
81 | if MESHID ~= "nil" and MESHID ~= "" then | |
82 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
83 | end | |
84 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
85 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
86 | end | |
87 | end | |
88 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
89 | NEWMESH.Scale = SCALE | |
90 | NEWMESH.Parent = PARENT | |
91 | return NEWMESH | |
92 | end | |
93 | ||
94 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE) | |
95 | local NEWPART = IT("Part") | |
96 | NEWPART.formFactor = FORMFACTOR | |
97 | NEWPART.Reflectance = REFLECTANCE | |
98 | NEWPART.Transparency = TRANSPARENCY | |
99 | NEWPART.CanCollide = false | |
100 | NEWPART.Locked = true | |
101 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
102 | NEWPART.Name = NAME | |
103 | NEWPART.Size = SIZE | |
104 | NEWPART.Position = Torso.Position | |
105 | NEWPART.Material = MATERIAL | |
106 | NEWPART:BreakJoints() | |
107 | NEWPART.Parent = PARENT | |
108 | return NEWPART | |
109 | end | |
110 | ||
111 | ||
112 | --//=================================\\ | |
113 | --|| CUSTOMIZATION | |
114 | --\\=================================// | |
115 | ||
116 | Class_Name = "₱Ɽł₴₥.exe" | |
117 | Weapon_Name = "Add-ons" | |
118 | ||
119 | Custom_Colors = { | |
120 | Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon. | |
121 | Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon. | |
122 | ||
123 | Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities. | |
124 | Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar. | |
125 | Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar. | |
126 | Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar. | |
127 | Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar. | |
128 | ||
129 | Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar. | |
130 | Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar. | |
131 | Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar. | |
132 | Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar. | |
133 | Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities. | |
134 | } | |
135 | ||
136 | ||
137 | Player_Size = 1 --Size of the player. | |
138 | Animation_Speed = 3 | |
139 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
140 | ||
141 | local Speed = 16 | |
142 | local Effects2 = {} | |
143 | ||
144 | --//=================================\\ | |
145 | --|| END OF CUSTOMIZATION | |
146 | --\\=================================// | |
147 | ||
148 | local function weldBetween(a, b) | |
149 | local weldd = Instance.new("ManualWeld") | |
150 | weldd.Part0 = a | |
151 | weldd.Part1 = b | |
152 | weldd.C0 = CFrame.new() | |
153 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
154 | weldd.Parent = a | |
155 | return weldd | |
156 | end | |
157 | ||
158 | function createaccessory(attachmentpart,mesh,texture,scale,offset,color) | |
159 | local acs = Instance.new("Part") | |
160 | acs.CanCollide = false | |
161 | acs.Anchored = false | |
162 | acs.Size = Vector3.new(0,0,0) | |
163 | acs.CFrame = attachmentpart.CFrame | |
164 | acs.Parent = Character | |
165 | acs.BrickColor = color | |
166 | local meshs = Instance.new("SpecialMesh") | |
167 | meshs.MeshId = mesh | |
168 | meshs.TextureId = texture | |
169 | meshs.Parent = acs | |
170 | meshs.Scale = scale | |
171 | meshs.Offset = offset | |
172 | weldBetween(attachmentpart,acs) | |
173 | end | |
174 | ||
175 | function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE) | |
176 | if TYPE == "Gem" then | |
177 | local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0)) | |
178 | acs.Anchored = false | |
179 | acs.CanCollide = false | |
180 | acs.CFrame = PART.CFrame | |
181 | local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET) | |
182 | weldBetween(PART,acs) | |
183 | elseif TYPE == "Skull" then | |
184 | local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0)) | |
185 | acs.Anchored = false | |
186 | acs.CanCollide = false | |
187 | acs.CFrame = PART.CFrame | |
188 | local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET) | |
189 | weldBetween(PART,acs) | |
190 | elseif TYPE == "Eye" then | |
191 | local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0)) | |
192 | acs.Anchored = false | |
193 | acs.CanCollide = false | |
194 | acs.CFrame = PART.CFrame | |
195 | local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET) | |
196 | weldBetween(PART,acs) | |
197 | end | |
198 | end | |
199 | ||
200 | --//=================================\\ | |
201 | --|| USEFUL VALUES | |
202 | --\\=================================// | |
203 | ||
204 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
205 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
206 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
207 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
208 | local CO1 = 0 | |
209 | local CO2 = 0 | |
210 | local CO3 = 0 | |
211 | local CO4 = 0 | |
212 | local CHANGEDEFENSE = 0 | |
213 | local CHANGEDAMAGE = 0 | |
214 | local CHANGEMOVEMENT = 0 | |
215 | local ANIM = "Idle" | |
216 | local ATTACK = false | |
217 | local EQUIPPED = false | |
218 | local HOLD = false | |
219 | local COMBO = 1 | |
220 | local LASTPOINT = nil | |
221 | local BLCF = nil | |
222 | local SCFR = nil | |
223 | local STAGGERHITANIM = false | |
224 | local STAGGERANIM = false | |
225 | local STUNANIM = false | |
226 | local CRITCHANCENUMBER = 0 | |
227 | local IDLENUMBER = 0 | |
228 | local DONUMBER = 0 | |
229 | local HANDIDLE = false | |
230 | local SINE = 0 | |
231 | local CHANGE = 2 / Animation_Speed | |
232 | local WALKINGANIM = false | |
233 | local WALK = 0 | |
234 | local KEYHOLD = false | |
235 | local DISABLEJUMPING = false | |
236 | local HASBEENBLOCKED = false | |
237 | local STUNDELAYNUMBER = 0 | |
238 | local MANADELAYNUMBER = 0 | |
239 | local SECONDARYMANADELAYNUMBER = 0 | |
240 | local ROBLOXIDLEANIMATION = IT("Animation") | |
241 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
242 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
243 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
244 | local WEAPONGUI = IT("ScreenGui", nil) | |
245 | WEAPONGUI.Name = "Weapon GUI" | |
246 | local WEAPONTOOL = IT("HopperBin", nil) | |
247 | WEAPONTOOL.Name = Weapon_Name | |
248 | local Weapon = IT("Model") | |
249 | Weapon.Name = Weapon_Name | |
250 | local Effects = IT("Folder", Weapon) | |
251 | Effects.Name = "Effects" | |
252 | local ANIMATOR = Humanoid.Animator | |
253 | local ANIMATE = Character.Animate | |
254 | local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"} | |
255 | local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"} | |
256 | local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"} | |
257 | local HITBLOCKSOUNDS = {"199148933", "199148947"} | |
258 | local CUTSOUNDS = {"645750958","645747150"} | |
259 | local VICIOUSWOOSH = "658941933" | |
260 | local RELEASESOUND = "565538688" | |
261 | local CHARGESOUND = "565538601" | |
262 | local UNANCHOR = true | |
263 | local MAGICPARTICLE = "1229782954" | |
264 | ||
265 | --//=================================\\ | |
266 | --\\=================================// | |
267 | ||
268 | --//=================================\\ | |
269 | --|| STATS | |
270 | --\\=================================// | |
271 | ||
272 | if Character:FindFirstChild("Stats") ~= nil then | |
273 | Character:FindFirstChild("Stats").Parent = nil | |
274 | end | |
275 | ||
276 | local Stats = IT("Folder", nil) | |
277 | Stats.Name = "Stats" | |
278 | local ChangeStat = IT("Folder", Stats) | |
279 | ChangeStat.Name = "ChangeStat" | |
280 | local Defense = IT("NumberValue", Stats) | |
281 | Defense.Name = "Defense" | |
282 | Defense.Value = 1 | |
283 | local Movement = IT("NumberValue", Stats) | |
284 | Movement.Name = "Movement" | |
285 | Movement.Value = 1 | |
286 | local Damage = IT("NumberValue", Stats) | |
287 | Damage.Name = "Damage" | |
288 | Damage.Value = 1 | |
289 | local Mana = IT("NumberValue", Stats) | |
290 | Mana.Name = "Mana" | |
291 | Mana.Value = 0 | |
292 | local SecondaryMana = IT("NumberValue", Stats) | |
293 | SecondaryMana.Name = "SecondaryMana" | |
294 | SecondaryMana.Value = 0 | |
295 | local CanCrit = IT("BoolValue", Stats) | |
296 | CanCrit.Name = "CanCrit" | |
297 | CanCrit.Value = false | |
298 | local CritChance = IT("NumberValue", Stats) | |
299 | CritChance.Name = "CritChance" | |
300 | CritChance.Value = 20 | |
301 | local CanPenetrateArmor = IT("BoolValue", Stats) | |
302 | CanPenetrateArmor.Name = "CanPenetrateArmor" | |
303 | CanPenetrateArmor.Value = false | |
304 | local AntiTeamKill = IT("BoolValue", Stats) | |
305 | AntiTeamKill.Name = "AntiTeamKill" | |
306 | AntiTeamKill.Value = false | |
307 | local Rooted = IT("BoolValue", Stats) | |
308 | Rooted.Name = "Rooted" | |
309 | Rooted.Value = false | |
310 | local Block = IT("BoolValue", Stats) | |
311 | Block.Name = "Block" | |
312 | Block.Value = false | |
313 | local RecentEnemy = IT("ObjectValue", Stats) | |
314 | RecentEnemy.Name = "RecentEnemy" | |
315 | RecentEnemy.Value = nil | |
316 | local StaggerHit = IT("BoolValue", Stats) | |
317 | StaggerHit.Name = "StaggerHit" | |
318 | StaggerHit.Value = false | |
319 | local Stagger = IT("BoolValue", Stats) | |
320 | Stagger.Name = "Stagger" | |
321 | Stagger.Value = false | |
322 | local Stun = IT("BoolValue", Stats) | |
323 | Stun.Name = "Stun" | |
324 | Stun.Value = false | |
325 | local StunValue = IT("NumberValue", Stats) | |
326 | StunValue.Name = "StunValue" | |
327 | StunValue.Value = 0 | |
328 | ||
329 | ||
330 | --//=================================\\ | |
331 | --\\=================================// | |
332 | ||
333 | ||
334 | ||
335 | ||
336 | ||
337 | --//=================================\\ | |
338 | --|| DEBUFFS / BUFFS | |
339 | --\\=================================// | |
340 | ||
341 | local DEFENSECHANGE1 = IT("NumberValue", ChangeStat) | |
342 | DEFENSECHANGE1.Name = "ChangeDefense" | |
343 | DEFENSECHANGE1.Value = 0 | |
344 | ||
345 | local MOVEMENTCHANGE1 = IT("NumberValue", nil) | |
346 | MOVEMENTCHANGE1.Name = "ChangeMovement" | |
347 | MOVEMENTCHANGE1.Value = 0 | |
348 | ||
349 | --//=================================\\ | |
350 | --\\=================================// | |
351 | ||
352 | ||
353 | ||
354 | ||
355 | ||
356 | --//=================================\\ | |
357 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
358 | --\\=================================// | |
359 | ||
360 | ArtificialHB = Instance.new("BindableEvent", script) | |
361 | ArtificialHB.Name = "ArtificialHB" | |
362 | ||
363 | script:WaitForChild("ArtificialHB") | |
364 | ||
365 | frame = Frame_Speed | |
366 | tf = 0 | |
367 | allowframeloss = false | |
368 | tossremainder = false | |
369 | lastframe = tick() | |
370 | script.ArtificialHB:Fire() | |
371 | ||
372 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
373 | tf = tf + s | |
374 | if tf >= frame then | |
375 | if allowframeloss then | |
376 | script.ArtificialHB:Fire() | |
377 | lastframe = tick() | |
378 | else | |
379 | for i = 1, math.floor(tf / frame) do | |
380 | script.ArtificialHB:Fire() | |
381 | end | |
382 | lastframe = tick() | |
383 | end | |
384 | if tossremainder then | |
385 | tf = 0 | |
386 | else | |
387 | tf = tf - frame * math.floor(tf / frame) | |
388 | end | |
389 | end | |
390 | end) | |
391 | ||
392 | --//=================================\\ | |
393 | --\\=================================// | |
394 | ||
395 | ||
396 | ||
397 | ||
398 | ||
399 | --//=================================\\ | |
400 | --|| SOME FUNCTIONS | |
401 | --\\=================================// | |
402 | ||
403 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
404 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
405 | end | |
406 | ||
407 | function PositiveAngle(NUMBER) | |
408 | if NUMBER >= 0 then | |
409 | NUMBER = 0 | |
410 | end | |
411 | return NUMBER | |
412 | end | |
413 | ||
414 | function NegativeAngle(NUMBER) | |
415 | if NUMBER <= 0 then | |
416 | NUMBER = 0 | |
417 | end | |
418 | return NUMBER | |
419 | end | |
420 | ||
421 | function Swait(NUMBER) | |
422 | if NUMBER == 0 or NUMBER == nil then | |
423 | ArtificialHB.Event:wait() | |
424 | else | |
425 | for i = 1, NUMBER do | |
426 | ArtificialHB.Event:wait() | |
427 | end | |
428 | end | |
429 | end | |
430 | ||
431 | function QuaternionFromCFrame(cf) | |
432 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
433 | local trace = m00 + m11 + m22 | |
434 | if trace > 0 then | |
435 | local s = math.sqrt(1 + trace) | |
436 | local recip = 0.5 / s | |
437 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
438 | else | |
439 | local i = 0 | |
440 | if m11 > m00 then | |
441 | i = 1 | |
442 | end | |
443 | if m22 > (i == 0 and m00 or m11) then | |
444 | i = 2 | |
445 | end | |
446 | if i == 0 then | |
447 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
448 | local recip = 0.5 / s | |
449 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
450 | elseif i == 1 then | |
451 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
452 | local recip = 0.5 / s | |
453 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
454 | elseif i == 2 then | |
455 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
456 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
457 | end | |
458 | end | |
459 | end | |
460 | ||
461 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
462 | local xs, ys, zs = x + x, y + y, z + z | |
463 | local wx, wy, wz = w * xs, w * ys, w * zs | |
464 | local xx = x * xs | |
465 | local xy = x * ys | |
466 | local xz = x * zs | |
467 | local yy = y * ys | |
468 | local yz = y * zs | |
469 | local zz = z * zs | |
470 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
471 | end | |
472 | ||
473 | function QuaternionSlerp(a, b, t) | |
474 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
475 | local startInterp, finishInterp; | |
476 | if cosTheta >= 0.0001 then | |
477 | if (1 - cosTheta) > 0.0001 then | |
478 | local theta = ACOS(cosTheta) | |
479 | local invSinTheta = 1 / SIN(theta) | |
480 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
481 | finishInterp = SIN(t * theta) * invSinTheta | |
482 | else | |
483 | startInterp = 1 - t | |
484 | finishInterp = t | |
485 | end | |
486 | else | |
487 | if (1 + cosTheta) > 0.0001 then | |
488 | local theta = ACOS(-cosTheta) | |
489 | local invSinTheta = 1 / SIN(theta) | |
490 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
491 | finishInterp = SIN(t * theta) * invSinTheta | |
492 | else | |
493 | startInterp = t - 1 | |
494 | finishInterp = t | |
495 | end | |
496 | end | |
497 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
498 | end | |
499 | ||
500 | function Clerp(a, b, t) | |
501 | local qa = {QuaternionFromCFrame(a)} | |
502 | local qb = {QuaternionFromCFrame(b)} | |
503 | local ax, ay, az = a.x, a.y, a.z | |
504 | local bx, by, bz = b.x, b.y, b.z | |
505 | local _t = 1 - t | |
506 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
507 | end | |
508 | ||
509 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
510 | local frame = IT("Frame") | |
511 | frame.BackgroundTransparency = TRANSPARENCY | |
512 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
513 | frame.Position = POSITION | |
514 | frame.Size = SIZE | |
515 | frame.BackgroundColor3 = COLOR | |
516 | frame.BorderColor3 = BORDERCOLOR | |
517 | frame.Name = NAME | |
518 | frame.Parent = PARENT | |
519 | return frame | |
520 | end | |
521 | ||
522 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
523 | local label = IT("TextLabel") | |
524 | label.BackgroundTransparency = 1 | |
525 | label.Size = UD2(1, 0, 1, 0) | |
526 | label.Position = UD2(0, 0, 0, 0) | |
527 | label.TextColor3 = C3(255, 255, 255) | |
528 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
529 | label.TextTransparency = TRANSPARENCY | |
530 | label.FontSize = TEXTFONTSIZE | |
531 | label.Font = TEXTFONT | |
532 | label.BorderSizePixel = BORDERSIZEPIXEL | |
533 | label.TextScaled = true | |
534 | label.Text = TEXT | |
535 | label.Name = NAME | |
536 | label.Parent = PARENT | |
537 | return label | |
538 | end | |
539 | ||
540 | function NoOutlines(PART) | |
541 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
542 | end | |
543 | ||
544 | ||
545 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
546 | local NEWWELD = IT(TYPE) | |
547 | NEWWELD.Part0 = PART0 | |
548 | NEWWELD.Part1 = PART1 | |
549 | NEWWELD.C0 = C0 | |
550 | NEWWELD.C1 = C1 | |
551 | NEWWELD.Parent = PARENT | |
552 | return NEWWELD | |
553 | end | |
554 | ||
555 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
556 | local NEWSOUND = nil | |
557 | coroutine.resume(coroutine.create(function() | |
558 | NEWSOUND = IT("Sound", PARENT) | |
559 | NEWSOUND.Volume = VOLUME | |
560 | NEWSOUND.Pitch = PITCH | |
561 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
562 | --Swait() | |
563 | NEWSOUND:play() | |
564 | if DOESLOOP == false then | |
565 | repeat Swait() until NEWSOUND.Playing == false | |
566 | NEWSOUND:remove() | |
567 | elseif DOESLOOP == true then | |
568 | NEWSOUND.Looped = true | |
569 | end | |
570 | end)) | |
571 | return NEWSOUND | |
572 | end | |
573 | ||
574 | function CFrameFromTopBack(at, top, back) | |
575 | local right = top:Cross(back) | |
576 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
577 | end | |
578 | ||
579 | function CreateWave(inair,size,doesrotate,rotatedirection,waitt,part,offset,color) | |
580 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0)) | |
581 | local mesh = IT("SpecialMesh",wave) | |
582 | mesh.MeshType = "FileMesh" | |
583 | wave.Anchored = true | |
584 | mesh.MeshId = "http://www.roblox.com/asset/?id=20329976" | |
585 | mesh.Scale = VT(size,size,size) | |
586 | mesh.Offset = VT(0,0,-size/8) | |
587 | wave.CFrame = CF(part.p) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0)) | |
588 | coroutine.resume(coroutine.create(function(PART) | |
589 | for i = 1, waitt do | |
590 | Swait() | |
591 | mesh.Scale = mesh.Scale + VT(size/5,0,size/5) | |
592 | mesh.Offset = VT(0,0,-(mesh.Scale.X/8)) | |
593 | if doesrotate == true then | |
594 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0) | |
595 | end | |
596 | wave.Transparency = wave.Transparency + (0.5/waitt) | |
597 | if wave.Transparency > 0.99 then | |
598 | wave:remove() | |
599 | end | |
600 | end | |
601 | end)) | |
602 | end | |
603 | ||
604 | function CreateSwirl(inair,size,doesrotate,rotatedirection,waitt,part,offset,color) | |
605 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0)) | |
606 | local mesh = IT("SpecialMesh",wave) | |
607 | mesh.MeshType = "FileMesh" | |
608 | wave.Anchored = true | |
609 | mesh.MeshId = "http://www.roblox.com/asset/?id=1051557" | |
610 | mesh.Scale = VT(size,size,size) | |
611 | wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0)) | |
612 | coroutine.resume(coroutine.create(function(PART) | |
613 | for i = 1, waitt do | |
614 | Swait() | |
615 | mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5) | |
616 | if doesrotate == true then | |
617 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0) | |
618 | end | |
619 | wave.Transparency = wave.Transparency + (0.5/waitt) | |
620 | if wave.Transparency > 0.99 then | |
621 | wave:remove() | |
622 | end | |
623 | end | |
624 | end)) | |
625 | end | |
626 | ||
627 | function CreateTornado(inair,size,doesrotate,rotatedirection,waitt,part,offset,color) | |
628 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0)) | |
629 | local mesh = IT("SpecialMesh",wave) | |
630 | mesh.MeshType = "FileMesh" | |
631 | wave.Anchored = true | |
632 | mesh.MeshId = "http://www.roblox.com/asset/?id=102638417" | |
633 | mesh.Scale = VT(size,size,size) | |
634 | wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0)) | |
635 | coroutine.resume(coroutine.create(function(PART) | |
636 | for i = 1, waitt do | |
637 | Swait() | |
638 | mesh.Scale = mesh.Scale + VT(size/5,0,size/5) | |
639 | if doesrotate == true then | |
640 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0) | |
641 | end | |
642 | wave.Transparency = wave.Transparency + (0.5/waitt) | |
643 | if wave.Transparency > 0.99 then | |
644 | wave:remove() | |
645 | end | |
646 | end | |
647 | end)) | |
648 | end | |
649 | ||
650 | function CreateRing(inair,size,doesrotate,rotatedirection,waitt,part,offset,spin1,spin2,color) | |
651 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(color), "Effect", VT(0,0,0)) | |
652 | local mesh = IT("SpecialMesh",wave) | |
653 | mesh.MeshType = "FileMesh" | |
654 | mesh.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
655 | mesh.Scale = VT(size,size,size) | |
656 | wave.Anchored = true | |
657 | mesh.Offset = VT(0,0,0) | |
658 | wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(inair),RAD(0),RAD(0)) | |
659 | coroutine.resume(coroutine.create(function(PART) | |
660 | for i = 1, waitt do | |
661 | Swait() | |
662 | mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5) | |
663 | if doesrotate == true then | |
664 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(spin2, rotatedirection, spin1) | |
665 | end | |
666 | wave.Transparency = wave.Transparency + (0.5/waitt) | |
667 | if wave.Transparency > 0.99 then | |
668 | wave:remove() | |
669 | end | |
670 | end | |
671 | end)) | |
672 | end | |
673 | ||
674 | function MagicSphere(size,waitt,part,color) | |
675 | local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(color), "Effect", VT(0,0,0)) | |
676 | local mesh = IT("SpecialMesh",wave) | |
677 | mesh.MeshType = "Sphere" | |
678 | wave.Anchored = true | |
679 | mesh.Scale = VT(size,size,size) | |
680 | mesh.Offset = VT(0,0,0) | |
681 | wave.CFrame = part * ANGLES(RAD(0),RAD(0),RAD(0)) | |
682 | coroutine.resume(coroutine.create(function(PART) | |
683 | for i = 1, waitt do | |
684 | Swait() | |
685 | mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5) | |
686 | wave.Transparency = wave.Transparency + (1/waitt) | |
687 | if wave.Transparency > 0.99 then | |
688 | wave:remove() | |
689 | end | |
690 | end | |
691 | end)) | |
692 | end | |
693 | ||
694 | function MagicBlock(size,waitt,part,offset,color) | |
695 | local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(color), "Effect", VT(size,size,size)) | |
696 | local mesh = IT("BlockMesh",wave) | |
697 | wave.Anchored = true | |
698 | wave.CFrame = CF(part.Position) * CF(0,offset,0) * ANGLES(RAD(0),RAD(0),RAD(0)) | |
699 | coroutine.resume(coroutine.create(function(PART) | |
700 | for i = 1, waitt do | |
701 | Swait() | |
702 | mesh.Scale = mesh.Scale + VT(size/5,size/5,size/5) | |
703 | wave.CFrame = CF(wave.Position) * ANGLES(RAD(math(-360,360)),RAD(math(-360,360)),RAD(math(-360,360))) | |
704 | wave.Transparency = wave.Transparency + (1/waitt) | |
705 | if wave.Transparency > 0.99 then | |
706 | wave:remove() | |
707 | end | |
708 | end | |
709 | end)) | |
710 | end | |
711 | ||
712 | local EyeSizes={ | |
713 | NumberSequenceKeypoint.new(0,0.5,0), | |
714 | NumberSequenceKeypoint.new(1,0.2,0) | |
715 | } | |
716 | local EyeTrans={ | |
717 | NumberSequenceKeypoint.new(0,0,0), | |
718 | NumberSequenceKeypoint.new(1,1,0) | |
719 | } | |
720 | local PE=Instance.new("ParticleEmitter") | |
721 | PE.LightEmission=0.3 | |
722 | PE.Size=NumberSequence.new(EyeSizes) | |
723 | PE.Transparency=NumberSequence.new(EyeTrans) | |
724 | PE.Rotation=NumberRange.new(0,360) | |
725 | PE.LockedToPart = false | |
726 | PE.Speed = NumberRange.new(0,0,0) | |
727 | PE.ZOffset = 0.3 | |
728 | PE.Rate = 999 | |
729 | PE.Name = "Particles" | |
730 | ||
731 | function CreateParticles(art,text,accel,drag,lifetime,type,isenabledbydefault,locked) | |
732 | local particle = nil | |
733 | coroutine.resume(coroutine.create(function(PART) | |
734 | particle = PE:Clone() | |
735 | Swait() | |
736 | particle.Rate = 999 | |
737 | particle.Parent = art | |
738 | particle.Acceleration = accel | |
739 | if type == "Fire" then | |
740 | local EyeSizes={ | |
741 | NumberSequenceKeypoint.new(0,0.5,0.3), | |
742 | NumberSequenceKeypoint.new(1,0.2,0.2) | |
743 | } | |
744 | particle.Size = NumberSequence.new(EyeSizes) | |
745 | elseif type == "Smoke" then | |
746 | local EyeSizes={ | |
747 | NumberSequenceKeypoint.new(0,0.5,0), | |
748 | NumberSequenceKeypoint.new(1,5,0.5) | |
749 | } | |
750 | particle.Size = NumberSequence.new(EyeSizes) | |
751 | elseif type == "Solid" then | |
752 | local EyeSizes={ | |
753 | NumberSequenceKeypoint.new(0,0.5,0), | |
754 | NumberSequenceKeypoint.new(1,0.5,0) | |
755 | } | |
756 | particle.Size = NumberSequence.new(EyeSizes) | |
757 | end | |
758 | particle.Lifetime=NumberRange.new(lifetime) | |
759 | particle.Drag = drag | |
760 | if locked == true then | |
761 | particle.LockedToPart = true | |
762 | end | |
763 | particle.Texture = "http://www.roblox.com/asset/?id="..text | |
764 | particle.Enabled = isenabledbydefault | |
765 | end)) | |
766 | return particle | |
767 | end | |
768 | ||
769 | local EyeSizes={ | |
770 | NumberSequenceKeypoint.new(0,0.5,0), | |
771 | NumberSequenceKeypoint.new(1,0.2,0) | |
772 | } | |
773 | local EyeTrans={ | |
774 | NumberSequenceKeypoint.new(0,0,0), | |
775 | NumberSequenceKeypoint.new(1,1,0) | |
776 | } | |
777 | local PE2=Instance.new("ParticleEmitter") | |
778 | PE2.LightEmission=0.8 | |
779 | PE2.Size=NumberSequence.new(EyeSizes) | |
780 | PE2.Transparency=NumberSequence.new(EyeTrans) | |
781 | PE2.Rotation=NumberRange.new(0,360) | |
782 | PE2.LockedToPart = false | |
783 | PE2.Speed = NumberRange.new(0,0,0) | |
784 | PE2.ZOffset = 0.3 | |
785 | PE2.Rate = 999 | |
786 | PE2.VelocitySpread = 90000 | |
787 | PE2.Name = "Particles" | |
788 | ||
789 | function CreateParticles2(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed) | |
790 | local particle = nil | |
791 | coroutine.resume(coroutine.create(function(PART) | |
792 | particle = PE2:Clone() | |
793 | Swait() | |
794 | particle.Rate = 999 | |
795 | particle.Parent = art | |
796 | particle.Acceleration = accel | |
797 | if type == "Fire" then | |
798 | local EyeSizes={ | |
799 | NumberSequenceKeypoint.new(0,size,size/2), | |
800 | NumberSequenceKeypoint.new(1,size/4,size/8) | |
801 | } | |
802 | particle.Size = NumberSequence.new(EyeSizes) | |
803 | elseif type == "Smoke" then | |
804 | local EyeSizes={ | |
805 | NumberSequenceKeypoint.new(0,0.5,0), | |
806 | NumberSequenceKeypoint.new(1,5,0.5) | |
807 | } | |
808 | particle.Size = NumberSequence.new(EyeSizes) | |
809 | elseif type == "Solid" then | |
810 | local EyeSizes={ | |
811 | NumberSequenceKeypoint.new(0,0.5,0), | |
812 | NumberSequenceKeypoint.new(1,0.5,0) | |
813 | } | |
814 | particle.Size = NumberSequence.new(EyeSizes) | |
815 | end | |
816 | particle.Lifetime=NumberRange.new(lifetime) | |
817 | particle.Drag = drag | |
818 | if locked == true then | |
819 | particle.LockedToPart = true | |
820 | end | |
821 | particle.Speed = NumberRange.new(speed,speed,speed) | |
822 | particle.Texture = "http://www.roblox.com/asset/?id="..MAGICPARTICLE | |
823 | particle.Enabled = isenabledbydefault | |
824 | --particle.Color = ColorSequence.new(Color3.new(255, 255, 255)) | |
825 | end)) | |
826 | return particle | |
827 | end | |
828 | ||
829 | local Decal = IT("Decal") | |
830 | ||
831 | function CreateMagicCircle(size,doesrotate,rotatedirection,waitt,cframe,alwaysfade) | |
832 | local sinkhole = IT("Part") | |
833 | sinkhole.Size = VT(size,0,size) | |
834 | sinkhole.CFrame = cframe | |
835 | --sinkhole.Orientation = VT(0,0,0) | |
836 | sinkhole.Parent = Effects | |
837 | sinkhole.Material = "Neon" | |
838 | sinkhole.Color = C3(255, 255, 255) | |
839 | sinkhole.Anchored = true | |
840 | sinkhole.CanCollide = false | |
841 | sinkhole.Transparency = 1 | |
842 | local decal = Decal:Clone() | |
843 | decal.Parent = sinkhole | |
844 | decal.Face = "Top" | |
845 | decal.Texture = "http://www.roblox.com/asset/?id=1226241606" | |
846 | local decal2 = Decal:Clone() | |
847 | decal2.Parent = sinkhole | |
848 | decal2.Face = "Bottom" | |
849 | decal2.Texture = "http://www.roblox.com/asset/?id=1226241606" | |
850 | coroutine.resume(coroutine.create(function(PART) | |
851 | for i = 1, waitt do | |
852 | Swait() | |
853 | if doesrotate == true then | |
854 | sinkhole.CFrame = sinkhole.CFrame * CFrame.fromEulerAnglesXYZ(0, rotatedirection, 0) | |
855 | end | |
856 | if alwaysfade == true then | |
857 | decal.Transparency = decal.Transparency + (1/waitt) | |
858 | decal2.Transparency = decal.Transparency + (1/waitt) | |
859 | end | |
860 | if i > waitt-11 and (alwaysfade ~= true) then | |
861 | decal.Transparency = decal.Transparency + 0.1 | |
862 | decal2.Transparency = decal.Transparency + 0.1 | |
863 | end | |
864 | end | |
865 | sinkhole.Parent = nil | |
866 | end)) | |
867 | return sinkhole | |
868 | end | |
869 | ||
870 | --//=================================\\ | |
871 | --\\=================================// | |
872 | ||
873 | ||
874 | --//=================================\\ | |
875 | --|| WEAPON CREATION | |
876 | --\\=================================// | |
877 | ||
878 | if Player_Size ~= 1 then | |
879 | for _, v in pairs (Weapon:GetChildren()) do | |
880 | if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then | |
881 | local p1 = v.Part1 | |
882 | v.Part1 = nil | |
883 | local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components() | |
884 | v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12) | |
885 | v.Part1 = p1 | |
886 | elseif v.ClassName == "Part" then | |
887 | for _, b in pairs (v:GetChildren()) do | |
888 | if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then | |
889 | b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size) | |
890 | end | |
891 | end | |
892 | end | |
893 | end | |
894 | end | |
895 | ||
896 | Swait() | |
897 | ||
898 | local Plate = IT("Part",Weapon) | |
899 | Plate.Size = VT(1,0.1,1) | |
900 | Plate.Transparency = 1 | |
901 | Plate.CanCollide = false | |
902 | Plate.CFrame = LeftLeg.CFrame * CF(0,-1.1,0) | |
903 | CreateParticles(Plate,MAGICPARTICLE,VT(0,2,0),2,2,"Fire",true,true) | |
904 | weldBetween(LeftLeg,Plate) | |
905 | ||
906 | local Plate = IT("Part",Weapon) | |
907 | Plate.Size = VT(1,0.1,1) | |
908 | Plate.Transparency = 1 | |
909 | Plate.CanCollide = false | |
910 | Plate.CFrame = RightLeg.CFrame * CF(0,-1.1,0) | |
911 | CreateParticles(Plate,MAGICPARTICLE,VT(0,2,0),2,2,"Fire",true,true) | |
912 | weldBetween(RightLeg,Plate) | |
913 | ||
914 | local Plate = IT("Part",Weapon) | |
915 | Plate.Size = VT(1,0.1,1) | |
916 | Plate.Transparency = 1 | |
917 | Plate.CanCollide = false | |
918 | Plate.CFrame = RightArm.CFrame * CF(0,-1.1,0) | |
919 | CreateParticles(Plate,MAGICPARTICLE,VT(0,2,0),2,2,"Fire",true,true) | |
920 | weldBetween(RightArm,Plate) | |
921 | ||
922 | local Plate = IT("Part",Weapon) | |
923 | Plate.Size = VT(1,0.1,1) | |
924 | Plate.Transparency = 1 | |
925 | Plate.CanCollide = false | |
926 | Plate.CFrame = LeftArm.CFrame * CF(0,-1.1,0) | |
927 | CreateParticles(Plate,MAGICPARTICLE,VT(0,2,0),2,2,"Fire",true,true) | |
928 | weldBetween(LeftArm,Plate) | |
929 | ||
930 | local eye = IT("Part",Weapon) | |
931 | eye.Size = VT(0.2,0.2,0.2) | |
932 | eye.Shape = "Ball" | |
933 | eye.CFrame = Head.CFrame * CF(0.125,0.2,-0.55) | |
934 | eye.Material = "Neon" | |
935 | eye.BrickColor = BRICKC("Institutional white") | |
936 | weldBetween(Head,eye) | |
937 | ||
938 | ||
939 | ||
940 | for _, c in pairs(Weapon:GetChildren()) do | |
941 | if c.ClassName == "Part" then | |
942 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
943 | end | |
944 | end | |
945 | ||
946 | Weapon.Parent = Character | |
947 | ||
948 | Humanoid.Died:connect(function() | |
949 | ATTACK = true | |
950 | end) | |
951 | ||
952 | print(Class_Name.." loaded.") | |
953 | ||
954 | --//=================================\\ | |
955 | --\\=================================// | |
956 | ||
957 | ||
958 | ||
959 | ||
960 | ||
961 | --//=================================\\ | |
962 | --|| DAMAGE FUNCTIONS | |
963 | --\\=================================// | |
964 | ||
965 | function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) | |
966 | local STATPART = CreatePart(3, Effects, "Neon", 0, 1, "Institutional white", "Effect", VT()) | |
967 | STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0)) | |
968 | local BODYGYRO = IT("BodyGyro", STATPART) | |
969 | local BODYPOSITION = IT("BodyPosition", STATPART) | |
970 | BODYPOSITION.P = 2000 | |
971 | BODYPOSITION.D = 100 | |
972 | BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge) | |
973 | if LABELTYPE == "Normal" then | |
974 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2)) | |
975 | elseif LABELTYPE == "Debuff" then | |
976 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2)) | |
977 | elseif LABELTYPE == "Interruption" then | |
978 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2)) | |
979 | end | |
980 | game:GetService("Debris"):AddItem(STATPART ,5) | |
981 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART) | |
982 | BILLBOARDGUI.Adornee = STATPART | |
983 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
984 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
985 | BILLBOARDGUI.AlwaysOnTop = false | |
986 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI) | |
987 | TEXTLABEL.BackgroundTransparency = 1 | |
988 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
989 | TEXTLABEL.Text = TEXT | |
990 | TEXTLABEL.Font = "SciFi" | |
991 | TEXTLABEL.FontSize="Size42" | |
992 | TEXTLABEL.TextColor3 = COLOR | |
993 | TEXTLABEL.TextStrokeTransparency = 1 | |
994 | TEXTLABEL.TextScaled = true | |
995 | TEXTLABEL.TextWrapped = true | |
996 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
997 | wait(0.2) | |
998 | for i=1, 5 do | |
999 | wait() | |
1000 | THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0) | |
1001 | end | |
1002 | wait(1.2) | |
1003 | for i=1, 5 do | |
1004 | wait() | |
1005 | THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2 | |
1006 | THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2 | |
1007 | THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0) | |
1008 | end | |
1009 | THEPART.Parent = nil | |
1010 | end),STATPART, BODYPOSITION, TEXTLABEL) | |
1011 | end | |
1012 | ||
1013 | ||
1014 | --//=================================\\ | |
1015 | --|| DAMAGING | |
1016 | --\\=================================// | |
1017 | ||
1018 | function dealdamage(hit,min,max,maxstrength,beserk,critrate,critmultiplier) | |
1019 | if hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChild("HitBy"..Player.Name) == nil then | |
1020 | local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid") | |
1021 | local dmg = math.random(min,max) | |
1022 | if humanoid.Health > 0 then | |
1023 | if beserk == true then | |
1024 | humanoid.Health = 0 | |
1025 | else | |
1026 | CreateSound("260430060", hit, 1.2, MRANDOM(7, 12) / 10) | |
1027 | hit.Velocity = CFrame.new(Torso.Position,hit.Position).lookVector*5*maxstrength | |
1028 | if math.random(1,100) < critrate+1 then | |
1029 | humanoid.Health = humanoid.Health - dmg*critmultiplier | |
1030 | StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0)) | |
1031 | else | |
1032 | humanoid.Health = humanoid.Health - dmg | |
1033 | StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), dmg, C3(0, 0, 0)) | |
1034 | end | |
1035 | local defence = Instance.new("BoolValue",hit.Parent) | |
1036 | defence.Name = ("HitBy"..Player.Name) | |
1037 | game:GetService("Debris"):AddItem(defence, 0.5) | |
1038 | end | |
1039 | end | |
1040 | end | |
1041 | end | |
1042 | ||
1043 | function AoEDamage(position,radius,min,max,maxstrength,beserk,critrate,critmultiplier,CanBeDodgedByJumping) | |
1044 | local dmg = math.random(min,max) | |
1045 | for i,v in ipairs(workspace:GetChildren()) do | |
1046 | if v:FindFirstChild("HitBy"..Player.Name) == nil then | |
1047 | local body = v:GetChildren() | |
1048 | for part = 1, #body do | |
1049 | if(v:FindFirstChild("HitBy"..Player.Name) == nil and (body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then | |
1050 | if(body[part].Position - position).Magnitude < radius then | |
1051 | if v.ClassName == "Model" then | |
1052 | if v:FindFirstChild("Humanoid") then | |
1053 | if v.Humanoid.Health ~= 0 then | |
1054 | if CanBeDodgedByJumping == true then | |
1055 | if body[part].Position.Y < position.Y+5 then | |
1056 | if math.random(1,100) < critrate+1 then | |
1057 | v.Humanoid.Health = v.Humanoid.Health - dmg*critmultiplier | |
1058 | StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0)) | |
1059 | else | |
1060 | v.Humanoid.Health = v.Humanoid.Health - dmg | |
1061 | StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), dmg, C3(0, 0, 0)) | |
1062 | end | |
1063 | local defence = Instance.new("BoolValue",v) | |
1064 | defence.Name = ("HitBy"..Player.Name) | |
1065 | game:GetService("Debris"):AddItem(defence, 0.5) | |
1066 | end | |
1067 | else | |
1068 | if beserk == true then | |
1069 | v.Humanoid.Health = 0 | |
1070 | end | |
1071 | if math.random(1,100) < critrate+1 then | |
1072 | v.Humanoid.Health = v.Humanoid.Health - dmg*critmultiplier | |
1073 | StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0)) | |
1074 | else | |
1075 | v.Humanoid.Health = v.Humanoid.Health - dmg | |
1076 | StatLabel("Normal", body[part].CFrame * CF(0, 0 + (body[part].Size.z - 1), 0), dmg, C3(0, 0, 0)) | |
1077 | end | |
1078 | local defence = Instance.new("BoolValue",v) | |
1079 | defence.Name = ("HitBy"..Player.Name) | |
1080 | game:GetService("Debris"):AddItem(defence, 0.5) | |
1081 | end | |
1082 | end | |
1083 | end | |
1084 | end | |
1085 | body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength | |
1086 | end | |
1087 | end | |
1088 | end | |
1089 | if v.ClassName == "Part" then | |
1090 | if v.Anchored == false and (v.Position - position).Magnitude < radius then | |
1091 | v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength | |
1092 | end | |
1093 | end | |
1094 | end | |
1095 | end | |
1096 | end | |
1097 | ||
1098 | function attractnearest(postype,position,range,maxstrength,last) | |
1099 | if postype == "Vector" then | |
1100 | for i,v in ipairs(workspace:GetChildren()) do | |
1101 | local body = v:GetChildren() | |
1102 | for part = 1, #body do | |
1103 | if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then | |
1104 | if(body[part].Position - position).Magnitude < range then | |
1105 | if body[part]:FindFirstChild("ATTRACT") == nil then | |
1106 | local bv = Instance.new("BodyVelocity") | |
1107 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1108 | bv.velocity = CF(body[part].Position,position).lookVector*maxstrength | |
1109 | bv.Parent = body[part] | |
1110 | bv.Name = "ATTRACT" | |
1111 | else | |
1112 | coroutine.resume(coroutine.create(function() | |
1113 | for i = 1, last/5 do | |
1114 | Swait(5) | |
1115 | body[part].ATTRACT.velocity = CF(body[part].Position,position).lookVector*maxstrength | |
1116 | end | |
1117 | body[part].ATTRACT:remove() | |
1118 | end)) | |
1119 | end | |
1120 | end | |
1121 | end | |
1122 | end | |
1123 | if v.ClassName == "Part" then | |
1124 | if v.Anchored == false and (v.Position - position).Magnitude < range then | |
1125 | if v:FindFirstChild("ATTRACT") == nil then | |
1126 | local bv = Instance.new("BodyVelocity") | |
1127 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1128 | bv.velocity = CF(v.Position,position).lookVector*maxstrength | |
1129 | bv.Parent = v | |
1130 | bv.Name = "ATTRACT" | |
1131 | else | |
1132 | coroutine.resume(coroutine.create(function() | |
1133 | for i = 1, last/5 do | |
1134 | Swait(5) | |
1135 | v.ATTRACT.velocity = CF(v.Position,position).lookVector*maxstrength | |
1136 | end | |
1137 | v.ATTRACT:remove() | |
1138 | end)) | |
1139 | end | |
1140 | end | |
1141 | end | |
1142 | end | |
1143 | elseif postype == "Part" then | |
1144 | for i,v in ipairs(workspace:GetChildren()) do | |
1145 | local body = v:GetChildren() | |
1146 | for part = 1, #body do | |
1147 | if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then | |
1148 | if(body[part].Position - position.Position).Magnitude < range then | |
1149 | if body[part]:FindFirstChild("ATTRACT") == nil then | |
1150 | local bv = Instance.new("BodyVelocity") | |
1151 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1152 | bv.velocity = CF(body[part].Position,position.Position).lookVector*maxstrength | |
1153 | bv.Parent = body[part] | |
1154 | bv.Name = "ATTRACT" | |
1155 | else | |
1156 | coroutine.resume(coroutine.create(function() | |
1157 | for i = 1, last/5 do | |
1158 | Swait(5) | |
1159 | body[part].ATTRACT.velocity = CF(body[part].Position,position.Position).lookVector*maxstrength | |
1160 | end | |
1161 | body[part].ATTRACT:remove() | |
1162 | end)) | |
1163 | end | |
1164 | end | |
1165 | end | |
1166 | end | |
1167 | if v.ClassName == "Part" then | |
1168 | if v.Anchored == false and (v.Position - position.Position).Magnitude < range then | |
1169 | if v:FindFirstChild("ATTRACT") == nil then | |
1170 | local bv = Instance.new("BodyVelocity") | |
1171 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1172 | bv.velocity = CF(v.Position,position.Position).lookVector*maxstrength | |
1173 | bv.Parent = v | |
1174 | bv.Name = "ATTRACT" | |
1175 | else | |
1176 | coroutine.resume(coroutine.create(function() | |
1177 | for i = 1, last/5 do | |
1178 | Swait(5) | |
1179 | v.ATTRACT.velocity = CF(v.Position,position.Position).lookVector*maxstrength | |
1180 | end | |
1181 | v.ATTRACT:remove() | |
1182 | end)) | |
1183 | end | |
1184 | end | |
1185 | end | |
1186 | end | |
1187 | end | |
1188 | end | |
1189 | ||
1190 | function killnearest(position,range,maxstrength,candestroy) | |
1191 | for i,v in ipairs(workspace:GetChildren()) do | |
1192 | local body = v:GetChildren() | |
1193 | for part = 1, #body do | |
1194 | if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then | |
1195 | if(body[part].Position - position).Magnitude < range then | |
1196 | if v.ClassName == "Model" then | |
1197 | v:BreakJoints() | |
1198 | end | |
1199 | if candestroy == true then | |
1200 | table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2}) | |
1201 | end | |
1202 | body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength | |
1203 | end | |
1204 | end | |
1205 | end | |
1206 | if v.ClassName == "Part" then | |
1207 | if v.Anchored == false and (v.Position - position).Magnitude < range then | |
1208 | if candestroy == true then | |
1209 | table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2}) | |
1210 | end | |
1211 | v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength | |
1212 | end | |
1213 | end | |
1214 | end | |
1215 | end | |
1216 | ||
1217 | --//=================================\\ | |
1218 | --|| ATTACK FUNCTIONS AND STUFF | |
1219 | --\\=================================// | |
1220 | ||
1221 | function CheckTableForString(Table, String) | |
1222 | for i, v in pairs(Table) do | |
1223 | if string.find(string.lower(String), string.lower(v)) then | |
1224 | return true | |
1225 | end | |
1226 | end | |
1227 | return false | |
1228 | end | |
1229 | ||
1230 | function CheckIntangible(Hit) | |
1231 | local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"} | |
1232 | if Hit and Hit.Parent then | |
1233 | if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then | |
1234 | return true | |
1235 | end | |
1236 | end | |
1237 | return false | |
1238 | end | |
1239 | ||
1240 | Debris = game:GetService("Debris") | |
1241 | ||
1242 | function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit) | |
1243 | local Direction = CFrame.new(StartPos, Vec).lookVector | |
1244 | local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore}) | |
1245 | local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore) | |
1246 | if RayHit and CheckIntangible(RayHit) then | |
1247 | if DelayIfHit then | |
1248 | wait() | |
1249 | end | |
1250 | RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit) | |
1251 | end | |
1252 | return RayHit, RayPos, RayNormal | |
1253 | end | |
1254 | ||
1255 | function turnto(pos) | |
1256 | RootPart.CFrame = CF(RootPart.Position,VT(pos.X,RootPart.Position.Y,pos.Z)) | |
1257 | end | |
1258 | ||
1259 | function GraviBomb() | |
1260 | ATTACK = true | |
1261 | for i=0, 1, 0.1 / Animation_Speed do | |
1262 | Swait() | |
1263 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-40)), 0.4 / Animation_Speed) | |
1264 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(35)) * ANGLES(RAD(2.5), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
1265 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1266 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.75 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(50)) * ANGLES(RAD(80), RAD(-20), RAD(-30)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1267 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1268 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1269 | end | |
1270 | MagicSphere(25,25,LeftArm.CFrame*CF(0,-1,0),"Institutional white") | |
1271 | MagicSphere(20,25,LeftArm.CFrame*CF(0,-1,0),"Institutional white") | |
1272 | coroutine.resume(coroutine.create(function() | |
1273 | local cframe = CF(Mouse.Hit.p) | |
1274 | local circle = CreateMagicCircle(75,true,0.05,120,cframe,false) | |
1275 | for i = 1, 5 do | |
1276 | CreateSound(CUTSOUNDS[MRANDOM(1, #CUTSOUNDS)], Effects, 2, 1) | |
1277 | local sphere = IT("Part",Effects) | |
1278 | sphere.Shape = "Ball" | |
1279 | sphere.Size = VT(50,50,50) | |
1280 | sphere.Anchored = true | |
1281 | sphere.CanCollide = false | |
1282 | sphere.Material = "Neon" | |
1283 | sphere.BrickColor = BRICKC("Institutional white") | |
1284 | sphere.Transparency = 0 | |
1285 | sphere.CFrame = cframe | |
1286 | for i = 1, 10 do | |
1287 | Swait(2) | |
1288 | attractnearest("Vector",cframe.p,75,50,10) | |
1289 | sphere.CFrame = cframe | |
1290 | sphere.Size = sphere.Size - VT(5,5,5) | |
1291 | sphere.CFrame = cframe | |
1292 | end | |
1293 | sphere:remove() | |
1294 | end | |
1295 | local scale = 5 | |
1296 | coroutine.resume(coroutine.create(function() | |
1297 | CreateSound(RELEASESOUND, Effects, 2, 1) | |
1298 | MagicSphere(100,125,cframe,"Institutional white") | |
1299 | MagicSphere(75,125,cframe,"Institutional white") | |
1300 | CreateSwirl(180,6,true,0.3,225,circle,0,"Institutional white") | |
1301 | CreateSwirl(180,4,true,0.3,225,circle,0,"Institutional white") | |
1302 | CreateSwirl(180,2,true,0.3,225,circle,0,"Institutional white") | |
1303 | for i = 1, 15 do | |
1304 | Swait() | |
1305 | killnearest(cframe.p,25,150) | |
1306 | end | |
1307 | end)) | |
1308 | end)) | |
1309 | for i=0, 1, 0.1 / Animation_Speed do | |
1310 | Swait() | |
1311 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.4 / Animation_Speed) | |
1312 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(25)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
1313 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1314 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.25 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-20 + MRANDOM(-2.5, 2.5))) * ANGLES(RAD(70 + MRANDOM(-2.5, 2.5)), RAD(40), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1315 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1316 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1317 | end | |
1318 | ATTACK = false | |
1319 | end | |
1320 | ||
1321 | function GraviSpear() | |
1322 | ATTACK = true | |
1323 | for i=0, 1.5, 0.1 / Animation_Speed do | |
1324 | Swait() | |
1325 | turnto(Mouse.Hit.p) | |
1326 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(75)), 0.4 / Animation_Speed) | |
1327 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 0.2 / Animation_Speed) | |
1328 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1329 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(25), RAD(-25)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1330 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1331 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1332 | end | |
1333 | local spear = IT("Part",Effects) | |
1334 | spear.Anchored = true | |
1335 | spear.CanCollide = false | |
1336 | spear.Shape = "Ball" | |
1337 | spear.Size = VT(0,0,0) | |
1338 | spear.Material = "Neon" | |
1339 | spear.Transparency = 0.2 | |
1340 | spear.BrickColor = BRICKC("Institutional white") | |
1341 | spear.CFrame = RightArm.CFrame * CF(0,-4,0) | |
1342 | local inner = spear:Clone() | |
1343 | inner.Parent = spear | |
1344 | inner.Size = VT(0,0,0) | |
1345 | inner.BrickColor = BRICKC("Institutional white") | |
1346 | inner.CFrame = spear.CFrame | |
1347 | for i = 1, 10 do | |
1348 | Swait() | |
1349 | turnto(Mouse.Hit.p) | |
1350 | spear.CFrame = RightArm.CFrame * CF(0,-4,0) | |
1351 | inner.CFrame = spear.CFrame | |
1352 | spear.Size = spear.Size + VT(0.4,0.4,0.4) | |
1353 | inner.Size = inner.Size + VT(0.35,0.35,0.35) | |
1354 | end | |
1355 | CreateParticles2(inner,VT(0,0,0),5,1,"Smoke",true,true,1,8) | |
1356 | MagicSphere(25,25,RightArm.CFrame*CF(0,-1,0),"Institutional white") | |
1357 | MagicSphere(20,25,RightArm.CFrame*CF(0,-1,0),"Institutional white") | |
1358 | CreateSound(CUTSOUNDS[MRANDOM(1, #CUTSOUNDS)], RightArm, 6, 1) | |
1359 | local bv = Instance.new("BodyVelocity") | |
1360 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1361 | bv.velocity = CF(spear.Position,Mouse.Hit.p).lookVector*65 | |
1362 | bv.Parent = spear | |
1363 | bv.Name = "MOVE" | |
1364 | weldBetween(spear,inner) | |
1365 | spear.Anchored = false | |
1366 | inner.Anchored = false | |
1367 | local harm = spear.Touched:Connect(function(hit) | |
1368 | if hit.Parent ~= Character and hit.Parent ~= Weapon and hit.Parent ~= Effects then | |
1369 | local cframe = spear.CFrame | |
1370 | coroutine.resume(coroutine.create(function() | |
1371 | spear.Parent = nil | |
1372 | coroutine.resume(coroutine.create(function() | |
1373 | CreateSound(RELEASESOUND, Effects, 2, 1) | |
1374 | MagicSphere(60,125,cframe,"Institutional white") | |
1375 | MagicSphere(50,125,cframe,"Institutional white") | |
1376 | CreateSwirl(0,6,true,0.3,125,spear,0,"Institutional white") | |
1377 | CreateSwirl(0,4,true,0.3,125,spear,0,"Institutional white") | |
1378 | CreateSwirl(0,2,true,0.3,125,spear,0,"Institutional white") | |
1379 | for i = 1, 15 do | |
1380 | Swait() | |
1381 | killnearest(cframe.p,15,150) | |
1382 | end | |
1383 | end)) | |
1384 | end)) | |
1385 | end | |
1386 | end) | |
1387 | coroutine.resume(coroutine.create(function() | |
1388 | repeat | |
1389 | Swait() | |
1390 | CreateSwirl(0,2,true,0.3,25,spear,0,"Institutional white") | |
1391 | attractnearest("Part",spear,65,70,5) | |
1392 | until spear.Parent == nil | |
1393 | end)) | |
1394 | ATTACK = false | |
1395 | end | |
1396 | ||
1397 | function WarpSpear() | |
1398 | ATTACK = true | |
1399 | for i=0, 1.5, 0.1 / Animation_Speed do | |
1400 | Swait() | |
1401 | turnto(Mouse.Hit.p) | |
1402 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(75)), 0.4 / Animation_Speed) | |
1403 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 0.2 / Animation_Speed) | |
1404 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1405 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(25), RAD(-25)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1406 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1407 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1408 | end | |
1409 | local spear = IT("Part",Effects) | |
1410 | spear.Anchored = true | |
1411 | spear.CanCollide = false | |
1412 | spear.Shape = "Ball" | |
1413 | spear.Size = VT(0,0,0) | |
1414 | spear.Material = "Neon" | |
1415 | spear.Transparency = 0.2 | |
1416 | spear.BrickColor = BRICKC("Institutional white") | |
1417 | spear.CFrame = RightArm.CFrame * CF(0,-4,0) | |
1418 | local inner = spear:Clone() | |
1419 | inner.Parent = spear | |
1420 | inner.Size = VT(0,0,0) | |
1421 | inner.BrickColor = BRICKC("Institutional white") | |
1422 | inner.CFrame = spear.CFrame | |
1423 | for i = 1, 5 do | |
1424 | Swait() | |
1425 | turnto(Mouse.Hit.p) | |
1426 | spear.CFrame = RightArm.CFrame * CF(0,-4,0) | |
1427 | inner.CFrame = spear.CFrame | |
1428 | spear.Size = spear.Size + VT(0.4,0.4,0.4) | |
1429 | inner.Size = inner.Size + VT(0.35,0.35,0.35) | |
1430 | end | |
1431 | MagicSphere(25,25,RightArm.CFrame*CF(0,-1,0),"Institutional white") | |
1432 | MagicSphere(20,25,RightArm.CFrame*CF(0,-1,0),"Institutional white") | |
1433 | CreateSound(CUTSOUNDS[MRANDOM(1, #CUTSOUNDS)], RightArm, 6, 1) | |
1434 | local bv = Instance.new("BodyVelocity") | |
1435 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1436 | bv.velocity = CF(spear.Position,Mouse.Hit.p).lookVector*100 | |
1437 | bv.Parent = spear | |
1438 | bv.Name = "MOVE" | |
1439 | weldBetween(spear,inner) | |
1440 | spear.Anchored = false | |
1441 | inner.Anchored = false | |
1442 | local HIT = false | |
1443 | local harm = spear.Touched:Connect(function(hit) | |
1444 | if HIT == false and hit.Parent ~= Character and hit.Parent ~= Weapon and hit.Parent ~= Effects then | |
1445 | local cframe = spear.CFrame | |
1446 | HIT = true | |
1447 | coroutine.resume(coroutine.create(function() | |
1448 | spear.Parent = nil | |
1449 | RootPart.CFrame = CF(spear.Position,Mouse.Hit.p) | |
1450 | coroutine.resume(coroutine.create(function() | |
1451 | CreateSound(RELEASESOUND, Effects, 2, 1.5) | |
1452 | MagicSphere(30,105,cframe,"Institutional white") | |
1453 | MagicSphere(25,105,cframe,"Institutional white") | |
1454 | for i = 1, 15 do | |
1455 | Swait() | |
1456 | killnearest(cframe.p,7.5,150) | |
1457 | end | |
1458 | end)) | |
1459 | end)) | |
1460 | end | |
1461 | end) | |
1462 | coroutine.resume(coroutine.create(function() | |
1463 | Swait(75) | |
1464 | if HIT == false then | |
1465 | local cframe = spear.CFrame | |
1466 | HIT = true | |
1467 | coroutine.resume(coroutine.create(function() | |
1468 | spear.Parent = nil | |
1469 | RootPart.CFrame = CF(spear.Position,Mouse.Hit.p) | |
1470 | coroutine.resume(coroutine.create(function() | |
1471 | CreateSound(RELEASESOUND, Effects, 2, 1.5) | |
1472 | MagicSphere(30,105,cframe,"Institutional white") | |
1473 | MagicSphere(25,105,cframe,"Institutional white") | |
1474 | for i = 1, 15 do | |
1475 | Swait() | |
1476 | killnearest(cframe.p,7.5,150) | |
1477 | end | |
1478 | end)) | |
1479 | end)) | |
1480 | end | |
1481 | end)) | |
1482 | coroutine.resume(coroutine.create(function() | |
1483 | local loop = 0 | |
1484 | repeat | |
1485 | Swait() | |
1486 | loop = loop + 1 | |
1487 | if loop == 4 then | |
1488 | MagicSphere(25,15,spear.CFrame,"Institutional white") | |
1489 | end | |
1490 | if loop == 7 then | |
1491 | loop = 0 | |
1492 | MagicSphere(25,15,spear.CFrame,"Institutional white") | |
1493 | end | |
1494 | attractnearest("Part",spear,12.5,50,5) | |
1495 | until spear.Parent == nil | |
1496 | end)) | |
1497 | ATTACK = false | |
1498 | end | |
1499 | ||
1500 | function GravityGlobe() | |
1501 | ATTACK = true | |
1502 | Rooted = true | |
1503 | for i=0, 1, 0.1 / Animation_Speed do | |
1504 | Swait() | |
1505 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-40)), 0.4 / Animation_Speed) | |
1506 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(35)) * ANGLES(RAD(2.5), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
1507 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1508 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.75 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(50)) * ANGLES(RAD(80), RAD(-20), RAD(-30)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1509 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1510 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1511 | end | |
1512 | coroutine.resume(coroutine.create(function() | |
1513 | CreateMagicCircle(100,true,0.02,50,CF(RootPart.Position) * CF(0,-2.8,0),true) | |
1514 | local cframe = RootPart.CFrame | |
1515 | CreateSound(RELEASESOUND, Effects, 2, 1) | |
1516 | local sphere = IT("Part",Effects) | |
1517 | sphere.Shape = "Ball" | |
1518 | sphere.Size = VT(0,0,0) | |
1519 | sphere.Anchored = true | |
1520 | sphere.CanCollide = false | |
1521 | sphere.Material = "Neon" | |
1522 | sphere.Transparency = 0.5 | |
1523 | sphere.BrickColor = BRICKC("Institutional white") | |
1524 | sphere.CFrame = cframe | |
1525 | local sphere2 = IT("Part",Effects) | |
1526 | sphere2.Shape = "Ball" | |
1527 | sphere2.Size = VT(0,0,0) | |
1528 | sphere2.Anchored = true | |
1529 | sphere2.CanCollide = false | |
1530 | sphere2.Material = "Neon" | |
1531 | sphere2.Transparency = 0.3 | |
1532 | sphere2.BrickColor = BRICKC("Institutional white") | |
1533 | sphere2.CFrame = cframe | |
1534 | for i = 1, 10 do | |
1535 | Swait(2) | |
1536 | attractnearest("Vector",cframe.p,50,50,10) | |
1537 | sphere.CFrame = cframe | |
1538 | sphere.Size = sphere.Size + VT(4,4,4) | |
1539 | sphere2.CFrame = cframe | |
1540 | sphere2.Size = sphere2.Size + VT(3.5,3.5,3.5) | |
1541 | killnearest(cframe.p,15,0) | |
1542 | end | |
1543 | local scale = 0.2 | |
1544 | local mode = "shrink" | |
1545 | for i = 1, 350 do | |
1546 | Swait() | |
1547 | if mode == "shrink" then | |
1548 | scale = scale + scale | |
1549 | if scale >= - 65 then | |
1550 | mode = "grow" | |
1551 | end | |
1552 | elseif mode == "grow" then | |
1553 | scale = scale + -scale*2 | |
1554 | if scale <= - 65 then | |
1555 | mode = "shrink" | |
1556 | end | |
1557 | end | |
1558 | CreateRing(180,5,true,0,50,sphere,0,scale,scale,"Institutional white") | |
1559 | sphere.Size = sphere.Size + VT(scale,scale,scale) | |
1560 | attractnearest("Vector",cframe.p,50,50,5) | |
1561 | killnearest(cframe.p,15,0) | |
1562 | end | |
1563 | for i = 1, 10 do | |
1564 | Swait(2) | |
1565 | sphere.CFrame = cframe | |
1566 | sphere.Size = sphere.Size - VT(5,5,5) | |
1567 | sphere.CFrame = cframe | |
1568 | sphere2.CFrame = cframe | |
1569 | sphere2.Size = sphere2.Size - VT(3.5,3.5,3.5) | |
1570 | end | |
1571 | sphere:remove() | |
1572 | sphere2:remove() | |
1573 | end)) | |
1574 | for i=0, 1, 0.1 / Animation_Speed do | |
1575 | Swait() | |
1576 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(5), RAD(0), RAD(-30)), 0.4 / Animation_Speed) | |
1577 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(25)) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
1578 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(70), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1579 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.25 * Player_Size, -0.25 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(-20 + MRANDOM(-2.5, 2.5))) * ANGLES(RAD(70 + MRANDOM(-2.5, 2.5)), RAD(40), RAD(0)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1580 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1581 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1582 | end | |
1583 | Rooted = false | |
1584 | ATTACK = false | |
1585 | end | |
1586 | ||
1587 | function GravityBeam() | |
1588 | ATTACK = true | |
1589 | Rooted = true | |
1590 | for i=0, 1.5, 0.1 / Animation_Speed do | |
1591 | Swait() | |
1592 | turnto(Mouse.Hit.p) | |
1593 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(75)), 0.4 / Animation_Speed) | |
1594 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-75)), 0.2 / Animation_Speed) | |
1595 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1596 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(25), RAD(-25)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1597 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1598 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1599 | end | |
1600 | local startpos = RightArm.CFrame*CF(0,-1.5,0).p | |
1601 | local loop = 0 | |
1602 | local loopsound = CreateSound(CHARGESOUND, RightArm, 10, 1, true) | |
1603 | local loopsound2 = CreateSound("487214658", Effects, 1, 0, true) | |
1604 | local pos = nil | |
1605 | repeat | |
1606 | if loop < 150 then | |
1607 | Swait() | |
1608 | loop = loop + 1 | |
1609 | turnto(Mouse.Hit.p) | |
1610 | MagicSphere(15,25,RightArm.CFrame*CF(0,-1,0),"Institutional white") | |
1611 | MagicSphere(12,25,RightArm.CFrame*CF(0,-1,0),"Institutional white") | |
1612 | else | |
1613 | loopsound2.Pitch = 1 | |
1614 | loopsound:Stop() | |
1615 | startpos = RightArm.CFrame*CF(0,-1.5,0).p | |
1616 | turnto(Mouse.Hit.p) | |
1617 | MagicSphere(35,25,CF(startpos),"Institutional white") | |
1618 | MagicSphere(32,25,CF(startpos),"Institutional white") | |
1619 | local RayHit, RayPos, RayNormal = CastZapRay(startpos, Mouse.Hit.p, 150, Character, false) | |
1620 | local distance = (startpos - RayPos).magnitude | |
1621 | local laser = Instance.new("Part",Effects) | |
1622 | laser.Transparency = 0.5 | |
1623 | laser.CanCollide = false | |
1624 | laser.Anchored = true | |
1625 | laser.BrickColor = BrickColor.new("Institutional white") | |
1626 | laser.Material = "Neon" | |
1627 | laser.formFactor = Enum.FormFactor.Custom | |
1628 | laser.Size = Vector3.new(2.5, 2.5, distance) | |
1629 | laser.CFrame = CFrame.new(startpos, RayPos) * CFrame.new(0, 0, -distance/2) | |
1630 | local laser2 = Instance.new("Part",Effects) | |
1631 | laser2.Transparency = 0 | |
1632 | laser2.CanCollide = false | |
1633 | laser2.Anchored = true | |
1634 | laser2.BrickColor = BrickColor.new("Institutional white") | |
1635 | laser2.Material = "Neon" | |
1636 | laser2.formFactor = Enum.FormFactor.Custom | |
1637 | laser2.Size = Vector3.new(2, 2, distance) | |
1638 | laser2.CFrame = CFrame.new(startpos, RayPos) * CFrame.new(0, 0, -distance/2) | |
1639 | killnearest(RayPos,5,150,true) | |
1640 | MagicSphere(350,2,CF(RayPos),"Institutional white") | |
1641 | MagicSphere(320,2,CF(RayPos),"Institutional white") | |
1642 | if RayHit ~= nil then | |
1643 | CreateWave(0,5,false,0,25,CF(RayPos),0,"Institutional white") | |
1644 | end | |
1645 | attractnearest("Vector",RayPos,40,50,10) | |
1646 | pos = RayPos | |
1647 | Swait() | |
1648 | laser2:remove() | |
1649 | laser:remove() | |
1650 | end | |
1651 | until KEYHOLD == false | |
1652 | if loop == 150 then | |
1653 | local cframe = CF(pos) | |
1654 | coroutine.resume(coroutine.create(function() | |
1655 | coroutine.resume(coroutine.create(function() | |
1656 | CreateSound(RELEASESOUND, Effects, 2, 1) | |
1657 | MagicSphere(500,55,cframe,"Institutional white") | |
1658 | MagicSphere(450,55,cframe,"Institutional white") | |
1659 | for i = 1, 15 do | |
1660 | Swait() | |
1661 | killnearest(cframe.p,75,150) | |
1662 | end | |
1663 | end)) | |
1664 | end)) | |
1665 | end | |
1666 | loopsound2:remove() | |
1667 | loopsound:remove() | |
1668 | Rooted = false | |
1669 | ATTACK = false | |
1670 | end | |
1671 | ||
1672 | --//=================================\\ | |
1673 | --|| ASSIGN THINGS TO KEYS | |
1674 | --\\=================================// | |
1675 | ||
1676 | Humanoid.Changed:connect(function(Jump) | |
1677 | if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then | |
1678 | Humanoid.Jump = false | |
1679 | end | |
1680 | end) | |
1681 | ||
1682 | function MouseDown(Mouse) | |
1683 | if ATTACK == false then | |
1684 | end | |
1685 | end | |
1686 | ||
1687 | function MouseUp(Mouse) | |
1688 | HOLD = false | |
1689 | end | |
1690 | ||
1691 | function KeyDown(Key) | |
1692 | KEYHOLD = true | |
1693 | if Key == "q" and ATTACK == false then | |
1694 | GraviBomb() | |
1695 | end | |
1696 | ||
1697 | if Key == "e" and ATTACK == false then | |
1698 | GraviSpear() | |
1699 | end | |
1700 | ||
1701 | if Key == "r" and ATTACK == false then | |
1702 | GravityGlobe() | |
1703 | end | |
1704 | ||
1705 | if Key == "g" and ATTACK == false then | |
1706 | GravityBeam() | |
1707 | end | |
1708 | ||
1709 | if Key == "x" and ATTACK == false then | |
1710 | end | |
1711 | ||
1712 | if Key == "c" and ATTACK == false then | |
1713 | WarpSpear() | |
1714 | end | |
1715 | ||
1716 | if Key == "t" and ATTACK == false then | |
1717 | CreateSound("305685800", Head, 10, 1 ,false) | |
1718 | end | |
1719 | end | |
1720 | ||
1721 | function KeyUp(Key) | |
1722 | KEYHOLD = false | |
1723 | end | |
1724 | ||
1725 | Mouse.Button1Down:connect(function(NEWKEY) | |
1726 | MouseDown(NEWKEY) | |
1727 | end) | |
1728 | Mouse.Button1Up:connect(function(NEWKEY) | |
1729 | MouseUp(NEWKEY) | |
1730 | end) | |
1731 | Mouse.KeyDown:connect(function(NEWKEY) | |
1732 | KeyDown(NEWKEY) | |
1733 | end) | |
1734 | Mouse.KeyUp:connect(function(NEWKEY) | |
1735 | KeyUp(NEWKEY) | |
1736 | end) | |
1737 | ||
1738 | --//=================================\\ | |
1739 | --\\=================================// | |
1740 | ||
1741 | ||
1742 | function unanchor() | |
1743 | if UNANCHOR == true then | |
1744 | g = Character:GetChildren() | |
1745 | for i = 1, #g do | |
1746 | if g[i].ClassName == "Part" then | |
1747 | g[i].Anchored = false | |
1748 | end | |
1749 | end | |
1750 | end | |
1751 | end | |
1752 | ||
1753 | ||
1754 | --//=================================\\ | |
1755 | --|| WRAP THE WHOLE SCRIPT UP | |
1756 | --\\=================================// | |
1757 | ||
1758 | Humanoid.Changed:connect(function(Jump) | |
1759 | if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then | |
1760 | Humanoid.Jump = false | |
1761 | end | |
1762 | end) | |
1763 | ||
1764 | ANIMATE.Parent = nil | |
1765 | local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION) | |
1766 | IDLEANIMATION:Play() | |
1767 | ||
1768 | while true do | |
1769 | Swait() | |
1770 | SINE = SINE + CHANGE | |
1771 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
1772 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
1773 | local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position) | |
1774 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character) | |
1775 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
1776 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
1777 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.1 * COS(SINE / (WALKSPEEDVALUE / 2)) * Player_Size) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1778 | Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1779 | --RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1780 | --LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1781 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
1782 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1783 | Neck.C1 = Clerp(Neck.C1, CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1784 | --RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1785 | ----LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1786 | end | |
1787 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
1788 | ANIM = "Jump" | |
1789 | if ATTACK == false then | |
1790 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1791 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1792 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1793 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1794 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1795 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, -0.3 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1796 | end | |
1797 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
1798 | ANIM = "Fall" | |
1799 | if ATTACK == false then | |
1800 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1801 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1802 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1803 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1804 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1805 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1806 | end | |
1807 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
1808 | ANIM = "Idle" | |
1809 | if ATTACK == false then | |
1810 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size + 0.05 * COS(SINE / 12) * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1811 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(15 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1812 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1813 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1814 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size - 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1815 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.2 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1816 | end | |
1817 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
1818 | ANIM = "Walk" | |
1819 | WALK = WALK + 1 / Animation_Speed | |
1820 | if WALK >= 15 - (5 * (Humanoid.WalkSpeed / 16 / Player_Size)) then | |
1821 | WALK = 0 | |
1822 | if WALKINGANIM == true then | |
1823 | WALKINGANIM = false | |
1824 | elseif WALKINGANIM == false then | |
1825 | WALKINGANIM = true | |
1826 | end | |
1827 | end | |
1828 | --RightHip.C1 = Clerp(RightHip.C1, CF(0.5 * Player_Size, 0.875 * Player_Size - 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, -0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1829 | --LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5 * Player_Size, 0.875 * Player_Size + 0.125 * SIN(SINE / WALKSPEEDVALUE) * Player_Size, 0.125 * COS(SINE / WALKSPEEDVALUE) * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(60 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1830 | if ATTACK == false then | |
1831 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0.7 * Player_Size) * ANGLES(RAD(25), RAD(0), RAD(0)), 0.15 / Animation_Speed*3) | |
1832 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(-5 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1833 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1834 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1835 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size - 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(0), RAD(70), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1836 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0.2 * COS(SINE / 12) * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1837 | end | |
1838 | end | |
1839 | if #Effects2>0 then | |
1840 | for e=1,#Effects2 do | |
1841 | if Effects2[e]~=nil then | |
1842 | local Thing=Effects2[e] | |
1843 | if Thing~=nil then | |
1844 | local Part=Thing[1] | |
1845 | local Mode=Thing[2] | |
1846 | local Delay=Thing[3] | |
1847 | local IncX=Thing[4] | |
1848 | local IncY=Thing[5] | |
1849 | local IncZ=Thing[6] | |
1850 | local Part2=Thing[8] | |
1851 | if Thing[1].Transparency<=1 then | |
1852 | if Thing[2]=="Block1" then | |
1853 | Thing[1].CFrame=Thing[1].CFrame | |
1854 | Mesh=Thing[1].Mesh | |
1855 | Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6]) | |
1856 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1857 | elseif Thing[2]=="Cylinder" then | |
1858 | Mesh=Thing[1].Mesh | |
1859 | Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6]) | |
1860 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1861 | elseif Thing[2]=="Blood" then | |
1862 | Mesh=Thing[7] | |
1863 | Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0) | |
1864 | Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6]) | |
1865 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1866 | elseif Thing[2]=="Elec" then | |
1867 | Mesh=Thing[1].Mesh | |
1868 | Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9]) | |
1869 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1870 | elseif Thing[2]=="Disappear" then | |
1871 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1872 | end | |
1873 | else | |
1874 | Part.Parent=nil | |
1875 | table.remove(Effects2,e) | |
1876 | end | |
1877 | end | |
1878 | end | |
1879 | end | |
1880 | end | |
1881 | unanchor() | |
1882 | Humanoid.MaxHealth = "inf" | |
1883 | Humanoid.Health = "inf" | |
1884 | if Rooted == false then | |
1885 | Disable_Jump = false | |
1886 | Humanoid.WalkSpeed = Speed | |
1887 | elseif Rooted == true then | |
1888 | Disable_Jump = true | |
1889 | Humanoid.WalkSpeed = 0 | |
1890 | end | |
1891 | --CreateMagicCircle(2 ,false,0,3,LeftLeg.CFrame * CF(0,-1.2,0),true) | |
1892 | end | |
1893 | ||
1894 | --//=================================\\ | |
1895 | --\\=================================// | |
1896 | ||
1897 | ||
1898 | ||
1899 | ||
1900 | ||
1901 | --//====================================================\\-- | |
1902 | --|| END OF SCRIPT | |
1903 | --\\====================================================//-- |