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