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