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