SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end | |
2 | - | --|| CREATED BY SHACKLUSTER |
2 | + | print("FE Compatibility: by WaverlyCole & Mokiros") |
3 | - | --\\====================================================//-- |
3 | + | InternalData = {} |
4 | do | |
5 | script.Parent = owner.Character | |
6 | local Event = Instance.new("RemoteEvent") | |
7 | Event.Name = "UserInput" | |
8 | local function NewFakeEvent() | |
9 | local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect | |
10 | return Fake | |
11 | end | |
12 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
13 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
14 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
15 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
16 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
17 | local function TriggerEvent(self,Event,...) | |
18 | local Trigger = Mouse[Event] | |
19 | if Trigger and Trigger.fakeEvent and Trigger.Function then | |
20 | Trigger.Function(...) | |
21 | end | |
22 | end | |
23 | Mouse.TrigEvent = TriggerEvent | |
24 | UserInputService.TrigEvent = TriggerEvent | |
25 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
26 | if FiredBy.Name ~= owner.Name then end | |
27 | if Input.MouseEvent then | |
28 | Mouse.Target = Input.Target | |
29 | Mouse.Hit = Input.Hit | |
30 | else | |
31 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
32 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then | |
33 | return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") | |
34 | end | |
35 | for _,Action in pairs(ContextActionService.Actions) do | |
36 | for _,Key in pairs(Action.Keys) do | |
37 | if Key==Input.KeyCode then | |
38 | Action.Function(Action.Name,Input.UserInputState,Input) | |
39 | end | |
40 | end | |
41 | end | |
42 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
43 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
44 | end | |
45 | end) | |
46 | InternalData["Mouse"] = Mouse | |
47 | InternalData["ContextActionService"] = ContextActionService | |
48 | InternalData["UserInputService"] = UserInputService | |
49 | Event.Parent = NLS([[ | |
50 | local Player = owner | |
51 | local Event = script:WaitForChild("UserInput") | |
52 | local UserInputService = game:GetService("UserInputService") | |
53 | local Mouse = Player:GetMouse() | |
54 | local Input = function(Input,gameProcessedEvent) | |
55 | if gameProcessedEvent then return end | |
56 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
57 | end | |
58 | UserInputService.InputBegan:Connect(Input) | |
59 | UserInputService.InputEnded:Connect(Input) | |
60 | local Hit,Target | |
61 | while wait(1/30) do | |
62 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
63 | Hit,Target = Mouse.Hit,Mouse.Target | |
64 | Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
65 | end | |
66 | end | |
67 | ]],owner.Character) | |
68 | end | |
69 | RealGame = game;game = setmetatable({},{ | |
70 | __index = function (self,Index) | |
71 | local Sandbox = function (Thing) | |
72 | if Thing:IsA("Player") then | |
73 | local RealPlayer = Thing | |
74 | return setmetatable({},{ | |
75 | __index = function (self,Index) | |
76 | local Type = type(RealPlayer[Index]) | |
77 | if Type == "function" then | |
78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
79 | return function (self) | |
80 | return InternalData["Mouse"] | |
81 | end | |
82 | end | |
83 | return function (self,...) | |
84 | return RealPlayer[Index](RealPlayer,...) | |
85 | end | |
86 | else | |
87 | return RealPlayer[Index] | |
88 | end | |
89 | end; | |
90 | __tostring = function(self) | |
91 | return RealPlayer.Name | |
92 | end | |
93 | }) | |
94 | end | |
95 | end | |
96 | if RealGame[Index] then | |
97 | local Type = type(RealGame[Index]) | |
98 | if Type == "function" then | |
99 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
100 | return function (self,Service) | |
101 | if Service:lower() == "players" then | |
102 | return setmetatable({},{ | |
103 | __index = function (self2,Index2) | |
104 | local RealService = RealGame:GetService(Service) | |
105 | local Type2 = type(Index2) | |
106 | if Type2 == "function" then | |
107 | return function (self,...) | |
108 | return RealService[Index2](RealService,...) | |
109 | end | |
110 | else | |
111 | if Index2:lower() == "localplayer" then | |
112 | return Sandbox(owner) | |
113 | end | |
114 | return RealService[Index2] | |
115 | end | |
116 | end; | |
117 | __tostring = function(self) | |
118 | return RealGame:GetService(Service).Name | |
119 | end | |
120 | }) | |
121 | elseif Service:lower() == "contextactionservice" then | |
122 | return InternalData["ContextActionService"] | |
123 | elseif Service:lower() == "contextactionservice" then | |
124 | return InternalData["UserInputService"] | |
125 | elseif Service:lower() == "runservice" then | |
126 | return setmetatable({},{ | |
127 | __index = function(self2,Index2) | |
128 | local RealService = RealGame:GetService(Service) | |
129 | local Type2 = type(Index2) | |
130 | if Type2 == "function" then | |
131 | return function (self,...) | |
132 | return RealService[Index2](RealService,...) | |
133 | end | |
134 | else | |
135 | if Index2:lower() == "bindtorenderstep" then | |
136 | return function (self,Name,Priority,Function) | |
137 | return RealGame:GetService("RunService").Stepped:Connect(Function) | |
138 | end | |
139 | end | |
140 | if Index2:lower() == "renderstepped" then | |
141 | return RealService["Stepped"] | |
142 | end | |
143 | return RealService[Index2] | |
144 | end | |
145 | end | |
146 | }) | |
147 | else | |
148 | return RealGame:GetService(Service) | |
149 | end | |
150 | end | |
151 | end | |
152 | return function (self,...) | |
153 | return RealGame[Index](RealGame,...) | |
154 | end | |
155 | else | |
156 | if game:GetService(Index) then | |
157 | return game:GetService(Index) | |
158 | end | |
159 | return RealGame[Index] | |
160 | end | |
161 | else | |
162 | return nil | |
163 | end | |
164 | end | |
165 | });Game = game;owner = game:GetService("Players").LocalPlayer | |
166 | print("Complete! Running... Created by SHACKLUSTER") | |
167 | print(" created by SHACKLUSTER ") | |
168 | print(" created by SHACKLUSTER ") | |
169 | print(" created by SHACKLUSTER ") | |
170 | print(" created by SHACKLUSTER ") | |
171 | print(" created by SHACKLUSTER ") | |
172 | print(" created by SHACKLUSTER ") | |
173 | print(" created by SHACKLUSTER ") | |
174 | print(" created by SHACKLUSTER ") | |
175 | ||
176 | ||
177 | wait(0.2) | |
178 | ||
179 | Player = game:GetService("Players").LocalPlayer | |
180 | PlayerGui = Player.PlayerGui | |
181 | Cam = workspace.CurrentCamera | |
182 | Backpack = Player.Backpack | |
183 | Character = Player.Character | |
184 | Humanoid = Character.Humanoid | |
185 | Mouse = Player:GetMouse() | |
186 | RootPart = Character["HumanoidRootPart"] | |
187 | Torso = Character["Torso"] | |
188 | Head = Character["Head"] | |
189 | RightArm = Character["Right Arm"] | |
190 | LeftArm = Character["Left Arm"] | |
191 | RightLeg = Character["Right Leg"] | |
192 | LeftLeg = Character["Left Leg"] | |
193 | RootJoint = RootPart["RootJoint"] | |
194 | Neck = Torso["Neck"] | |
195 | RightShoulder = Torso["Right Shoulder"] | |
196 | LeftShoulder = Torso["Left Shoulder"] | |
197 | RightHip = Torso["Right Hip"] | |
198 | LeftHip = Torso["Left Hip"] | |
199 | local sick = Instance.new("Sound",Character) | |
200 | ||
201 | IT = Instance.new | |
202 | CF = CFrame.new | |
203 | VT = Vector3.new | |
204 | RAD = math.rad | |
205 | C3 = Color3.new | |
206 | UD2 = UDim2.new | |
207 | BRICKC = BrickColor.new | |
208 | ANGLES = CFrame.Angles | |
209 | EULER = CFrame.fromEulerAnglesXYZ | |
210 | COS = math.cos | |
211 | ACOS = math.acos | |
212 | SIN = math.sin | |
213 | ASIN = math.asin | |
214 | ABS = math.abs | |
215 | MRANDOM = math.random | |
216 | FLOOR = math.floor | |
217 | ||
218 | --//=================================\\ | |
219 | --|| USEFUL VALUES | |
220 | --\\=================================// | |
221 | ||
222 | Animation_Speed = 3 | |
223 | local Walkspeed = 16 | |
224 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
225 | local Speed = 16 | |
226 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
227 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
228 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
229 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
230 | local DAMAGEMULTIPLIER = 1 | |
231 | local ANIM = "Idle" | |
232 | local ATTACK = false | |
233 | local EQUIPPED = false | |
234 | local HOLD = false | |
235 | local COMBO = 1 | |
236 | local Rooted = false | |
237 | local SINE = 0 | |
238 | local KEYHOLD = false | |
239 | local CHANGE = 2 / Animation_Speed | |
240 | local WALKINGANIM = false | |
241 | local VALUE1 = false | |
242 | local VALUE2 = false | |
243 | local ROBLOXIDLEANIMATION = IT("Animation") | |
244 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
245 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
246 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
247 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
248 | WEAPONGUI.Name = "Weapon GUI" | |
249 | local Effects = IT("Folder", Character) | |
250 | Effects.Name = "Effects" | |
251 | local ANIMATOR = Humanoid.Animator | |
252 | local ANIMATE = Character.Animate | |
253 | local UNANCHOR = true | |
254 | local SHOCKSOUND = 1544280726 | |
255 | local RINGSOUND = 340505360 | |
256 | local ULTHIT = 412831137 | |
257 | ||
258 | --//=================================\\ | |
259 | --\\=================================// | |
260 | ||
261 | ||
262 | --//=================================\\ | |
263 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
264 | --\\=================================// | |
265 | ||
266 | ArtificialHB = Instance.new("BindableEvent", script) | |
267 | ArtificialHB.Name = "ArtificialHB" | |
268 | ||
269 | script:WaitForChild("ArtificialHB") | |
270 | ||
271 | frame = Frame_Speed | |
272 | tf = 0 | |
273 | allowframeloss = false | |
274 | tossremainder = false | |
275 | lastframe = tick() | |
276 | script.ArtificialHB:Fire() | |
277 | ||
278 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
279 | tf = tf + s | |
280 | if tf >= frame then | |
281 | if allowframeloss then | |
282 | script.ArtificialHB:Fire() | |
283 | lastframe = tick() | |
284 | else | |
285 | for i = 1, math.floor(tf / frame) do | |
286 | script.ArtificialHB:Fire() | |
287 | end | |
288 | lastframe = tick() | |
289 | end | |
290 | if tossremainder then | |
291 | tf = 0 | |
292 | else | |
293 | tf = tf - frame * math.floor(tf / frame) | |
294 | end | |
295 | end | |
296 | end) | |
297 | ||
298 | --//=================================\\ | |
299 | --\\=================================// | |
300 | ||
301 | --//=================================\\ | |
302 | --|| SOME FUNCTIONS | |
303 | --\\=================================// | |
304 | ||
305 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
306 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
307 | end | |
308 | ||
309 | function PositiveAngle(NUMBER) | |
310 | if NUMBER >= 0 then | |
311 | NUMBER = 0 | |
312 | end | |
313 | return NUMBER | |
314 | end | |
315 | ||
316 | function NegativeAngle(NUMBER) | |
317 | if NUMBER <= 0 then | |
318 | NUMBER = 0 | |
319 | end | |
320 | return NUMBER | |
321 | end | |
322 | ||
323 | function Swait(NUMBER) | |
324 | if NUMBER == 0 or NUMBER == nil then | |
325 | ArtificialHB.Event:wait() | |
326 | else | |
327 | for i = 1, NUMBER do | |
328 | ArtificialHB.Event:wait() | |
329 | end | |
330 | end | |
331 | end | |
332 | ||
333 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
334 | local NEWMESH = IT(MESH) | |
335 | if MESH == "SpecialMesh" then | |
336 | NEWMESH.MeshType = MESHTYPE | |
337 | if MESHID ~= "nil" and MESHID ~= "" then | |
338 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
339 | end | |
340 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
341 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
342 | end | |
343 | end | |
344 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
345 | NEWMESH.Scale = SCALE | |
346 | NEWMESH.Parent = PARENT | |
347 | return NEWMESH | |
348 | end | |
349 | ||
350 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
351 | local NEWPART = IT("Part") | |
352 | NEWPART.formFactor = FORMFACTOR | |
353 | NEWPART.Reflectance = REFLECTANCE | |
354 | NEWPART.Transparency = TRANSPARENCY | |
355 | NEWPART.CanCollide = false | |
356 | NEWPART.Locked = true | |
357 | NEWPART.Anchored = true | |
358 | if ANCHOR == false then | |
359 | NEWPART.Anchored = false | |
360 | end | |
361 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
362 | NEWPART.Name = NAME | |
363 | NEWPART.Size = SIZE | |
364 | NEWPART.Position = Torso.Position | |
365 | NEWPART.Material = MATERIAL | |
366 | NEWPART:BreakJoints() | |
367 | NEWPART.Parent = PARENT | |
368 | return NEWPART | |
369 | end | |
370 | ||
371 | local function weldBetween(a, b) | |
372 | local weldd = Instance.new("ManualWeld") | |
373 | weldd.Part0 = a | |
374 | weldd.Part1 = b | |
375 | weldd.C0 = CFrame.new() | |
376 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
377 | weldd.Parent = a | |
378 | return weldd | |
379 | end | |
380 | ||
381 | ||
382 | function QuaternionFromCFrame(cf) | |
383 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
384 | local trace = m00 + m11 + m22 | |
385 | if trace > 0 then | |
386 | local s = math.sqrt(1 + trace) | |
387 | local recip = 0.5 / s | |
388 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
389 | else | |
390 | local i = 0 | |
391 | if m11 > m00 then | |
392 | i = 1 | |
393 | end | |
394 | if m22 > (i == 0 and m00 or m11) then | |
395 | i = 2 | |
396 | end | |
397 | if i == 0 then | |
398 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
399 | local recip = 0.5 / s | |
400 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
401 | elseif i == 1 then | |
402 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
403 | local recip = 0.5 / s | |
404 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
405 | elseif i == 2 then | |
406 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
407 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
408 | end | |
409 | end | |
410 | end | |
411 | ||
412 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
413 | local xs, ys, zs = x + x, y + y, z + z | |
414 | local wx, wy, wz = w * xs, w * ys, w * zs | |
415 | local xx = x * xs | |
416 | local xy = x * ys | |
417 | local xz = x * zs | |
418 | local yy = y * ys | |
419 | local yz = y * zs | |
420 | local zz = z * zs | |
421 | 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)) | |
422 | end | |
423 | ||
424 | function QuaternionSlerp(a, b, t) | |
425 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
426 | local startInterp, finishInterp; | |
427 | if cosTheta >= 0.0001 then | |
428 | if (1 - cosTheta) > 0.0001 then | |
429 | local theta = ACOS(cosTheta) | |
430 | local invSinTheta = 1 / SIN(theta) | |
431 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
432 | finishInterp = SIN(t * theta) * invSinTheta | |
433 | else | |
434 | startInterp = 1 - t | |
435 | finishInterp = t | |
436 | end | |
437 | else | |
438 | if (1 + cosTheta) > 0.0001 then | |
439 | local theta = ACOS(-cosTheta) | |
440 | local invSinTheta = 1 / SIN(theta) | |
441 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
442 | finishInterp = SIN(t * theta) * invSinTheta | |
443 | else | |
444 | startInterp = t - 1 | |
445 | finishInterp = t | |
446 | end | |
447 | end | |
448 | 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 | |
449 | end | |
450 | ||
451 | function Clerp(a, b, t) | |
452 | local qa = {QuaternionFromCFrame(a)} | |
453 | local qb = {QuaternionFromCFrame(b)} | |
454 | local ax, ay, az = a.x, a.y, a.z | |
455 | local bx, by, bz = b.x, b.y, b.z | |
456 | local _t = 1 - t | |
457 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
458 | end | |
459 | ||
460 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
461 | local frame = IT("Frame") | |
462 | frame.BackgroundTransparency = TRANSPARENCY | |
463 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
464 | frame.Position = POSITION | |
465 | frame.Size = SIZE | |
466 | frame.BackgroundColor3 = COLOR | |
467 | frame.BorderColor3 = BORDERCOLOR | |
468 | frame.Name = NAME | |
469 | frame.Parent = PARENT | |
470 | return frame | |
471 | end | |
472 | ||
473 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
474 | local label = IT("TextLabel") | |
475 | label.BackgroundTransparency = 1 | |
476 | label.Size = UD2(1, 0, 1, 0) | |
477 | label.Position = UD2(0, 0, 0, 0) | |
478 | label.TextColor3 = TEXTCOLOR | |
479 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
480 | label.TextTransparency = TRANSPARENCY | |
481 | label.FontSize = TEXTFONTSIZE | |
482 | label.Font = TEXTFONT | |
483 | label.BorderSizePixel = BORDERSIZEPIXEL | |
484 | label.TextScaled = false | |
485 | label.Text = TEXT | |
486 | label.Name = NAME | |
487 | label.Parent = PARENT | |
488 | return label | |
489 | end | |
490 | ||
491 | function NoOutlines(PART) | |
492 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
493 | end | |
494 | ||
495 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
496 | local NEWWELD = IT(TYPE) | |
497 | NEWWELD.Part0 = PART0 | |
498 | NEWWELD.Part1 = PART1 | |
499 | NEWWELD.C0 = C0 | |
500 | NEWWELD.C1 = C1 | |
501 | NEWWELD.Parent = PARENT | |
502 | return NEWWELD | |
503 | end | |
504 | ||
505 | local S = IT("Sound") | |
506 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
507 | local NEWSOUND = nil | |
508 | coroutine.resume(coroutine.create(function() | |
509 | NEWSOUND = S:Clone() | |
510 | NEWSOUND.Parent = PARENT | |
511 | NEWSOUND.Volume = VOLUME | |
512 | NEWSOUND.Pitch = PITCH | |
513 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
514 | NEWSOUND:play() | |
515 | if DOESLOOP == true then | |
516 | NEWSOUND.Looped = true | |
517 | else | |
518 | repeat wait(1) until NEWSOUND.Playing == false | |
519 | NEWSOUND:remove() | |
520 | end | |
521 | end)) | |
522 | return NEWSOUND | |
523 | end | |
524 | ||
525 | function CFrameFromTopBack(at, top, back) | |
526 | local right = top:Cross(back) | |
527 | 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) | |
528 | end | |
529 | ||
530 | --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil}) | |
531 | function WACKYEFFECT(Table) | |
532 | local TYPE = (Table.EffectType or "Sphere") | |
533 | local SIZE = (Table.Size or VT(1,1,1)) | |
534 | local ENDSIZE = (Table.Size2 or VT(0,0,0)) | |
535 | local TRANSPARENCY = (Table.Transparency or 0) | |
536 | local ENDTRANSPARENCY = (Table.Transparency2 or 1) | |
537 | local CFRAME = (Table.CFrame or Torso.CFrame) | |
538 | local MOVEDIRECTION = (Table.MoveToPos or nil) | |
539 | local ROTATION1 = (Table.RotationX or 0) | |
540 | local ROTATION2 = (Table.RotationY or 0) | |
541 | local ROTATION3 = (Table.RotationZ or 0) | |
542 | local MATERIAL = (Table.Material or "Neon") | |
543 | local COLOR = (Table.Color or C3(1,1,1)) | |
544 | local TIME = (Table.Time or 45) | |
545 | local SOUNDID = (Table.SoundID or nil) | |
546 | local SOUNDPITCH = (Table.SoundPitch or nil) | |
547 | local SOUNDVOLUME = (Table.SoundVolume or nil) | |
548 | coroutine.resume(coroutine.create(function() | |
549 | local PLAYSSOUND = false | |
550 | local SOUND = nil | |
551 | local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true) | |
552 | if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then | |
553 | PLAYSSOUND = true | |
554 | SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false) | |
555 | end | |
556 | EFFECT.Color = COLOR | |
557 | local MSH = nil | |
558 | if TYPE == "Sphere" then | |
559 | MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0)) | |
560 | elseif TYPE == "Block" then | |
561 | MSH = IT("BlockMesh",EFFECT) | |
562 | MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X) | |
563 | elseif TYPE == "Wave" then | |
564 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8)) | |
565 | elseif TYPE == "Ring" then | |
566 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0)) | |
567 | elseif TYPE == "Slash" then | |
568 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
569 | elseif TYPE == "Round Slash" then | |
570 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0)) | |
571 | elseif TYPE == "Swirl" then | |
572 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0)) | |
573 | elseif TYPE == "Skull" then | |
574 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0)) | |
575 | elseif TYPE == "Crystal" then | |
576 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0)) | |
577 | elseif TYPE == "Cloud" then | |
578 | MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1290033", "", SIZE, VT(0,0,0)) | |
579 | end | |
580 | if MSH ~= nil then | |
581 | local MOVESPEED = nil | |
582 | if MOVEDIRECTION ~= nil then | |
583 | MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME | |
584 | end | |
585 | local GROWTH = SIZE - ENDSIZE | |
586 | local TRANS = TRANSPARENCY - ENDTRANSPARENCY | |
587 | if TYPE == "Block" then | |
588 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
589 | else | |
590 | EFFECT.CFrame = CFRAME | |
591 | end | |
592 | for LOOP = 1, TIME+1 do | |
593 | Swait() | |
594 | MSH.Scale = MSH.Scale - GROWTH/TIME | |
595 | if TYPE == "Wave" then | |
596 | - | local POWER = 250 |
596 | + | |
597 | - | local MAXPOWER = 500 |
597 | + | |
598 | EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME | |
599 | if TYPE == "Block" then | |
600 | EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360))) | |
601 | else | |
602 | EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3)) | |
603 | end | |
604 | if MOVEDIRECTION ~= nil then | |
605 | local ORI = EFFECT.Orientation | |
606 | EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED) | |
607 | EFFECT.Orientation = ORI | |
608 | end | |
609 | end | |
610 | if PLAYSSOUND == false then | |
611 | EFFECT:remove() | |
612 | else | |
613 | repeat Swait() until SOUND.Playing == false | |
614 | EFFECT:remove() | |
615 | end | |
616 | else | |
617 | if PLAYSSOUND == false then | |
618 | EFFECT:remove() | |
619 | else | |
620 | repeat Swait() until SOUND.Playing == false | |
621 | EFFECT:remove() | |
622 | end | |
623 | end | |
624 | end)) | |
625 | end | |
626 | ||
627 | function MakeForm(PART,TYPE) | |
628 | if TYPE == "Cyl" then | |
629 | local MSH = IT("CylinderMesh",PART) | |
630 | elseif TYPE == "Ball" then | |
631 | local MSH = IT("SpecialMesh",PART) | |
632 | MSH.MeshType = "Sphere" | |
633 | - | Humanoid.MaxHealth = 1200 |
633 | + | |
634 | - | Humanoid.Health = 1200 |
634 | + | |
635 | MSH.MeshType = "Wedge" | |
636 | end | |
637 | end | |
638 | ||
639 | Debris = game:GetService("Debris") | |
640 | ||
641 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
642 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
643 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
644 | end | |
645 | ||
646 | function turnto(position) | |
647 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
648 | end | |
649 | ||
650 | --Lightning({Color = C3(1,1,1), Start = Torso.Position, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = 400, Branches = false}) | |
651 | function Lightning(Table) | |
652 | local Color = Table.Color or C3(1,1,1) | |
653 | local StartPos = Table.Start or Torso.Position | |
654 | local EndPos = Table.End or Mouse.Hit.p | |
655 | local SegmentLength = Table.SegmentL or 2 | |
656 | local Thickness = Table.Thickness or 0.1 | |
657 | local Dissapear = Table.DoesFade or false | |
658 | local Parent = Table.Ignore or Character | |
659 | local MaxDist = Table.MaxDist or 400 | |
660 | local Branches = Table.Branches or false | |
661 | local HIT,HITPOS = CastProperRay(StartPos, EndPos, MaxDist, Parent) | |
662 | local DISTANCE = math.ceil((StartPos - HITPOS).Magnitude/SegmentLength) | |
663 | local LIGHTNINGMODEL = IT("Model",Effects) | |
664 | LIGHTNINGMODEL.Name = "Lightning" | |
665 | local LastBolt = nil | |
666 | for E = 1, DISTANCE do | |
667 | local ExtraSize = (DISTANCE-E)/25 | |
668 | local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Pearl"), "LightningPart"..E, VT(Thickness+ExtraSize,SegmentLength,Thickness+ExtraSize)) | |
669 | PART.Color = Color | |
670 | MakeForm(PART,"Cyl") | |
671 | if LastBolt == nil then | |
672 | PART.CFrame = CF(StartPos,HITPOS)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0) | |
673 | else | |
674 | PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,CF(HITPOS)*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))*CF(0,0,SegmentLength/3+(DISTANCE-E)).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0) | |
675 | end | |
676 | LastBolt = PART | |
677 | if Branches == true then | |
678 | local CHOICE = MRANDOM(1,7+((DISTANCE-E)*2)) | |
679 | if CHOICE == 1 then | |
680 | local LASTBRANCH = nil | |
681 | for i = 1, MRANDOM(2,5) do | |
682 | local ExtraSize2 = ((DISTANCE-E)/35)/i | |
683 | local PART = CreatePart(3, LIGHTNINGMODEL, "Neon", 0, 0, BRICKC("Pearl"), "Branch"..E.."-"..i, VT(Thickness+ExtraSize2,SegmentLength,Thickness+ExtraSize2)) | |
684 | PART.Color = Color | |
685 | MakeForm(PART,"Cyl") | |
686 | if LASTBRANCH == nil then | |
687 | PART.CFrame = CF(LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0).p,LastBolt.CFrame*CF(0,-LastBolt.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*7,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0) | |
688 | else | |
689 | PART.CFrame = CF(LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0).p,LASTBRANCH.CFrame*CF(0,-LASTBRANCH.Size.Y/2,0)*ANGLES(RAD(0),RAD(0),RAD(MRANDOM(0,360)))*CF(0,Thickness*3,0)*CF(0,0,-1).p)*ANGLES(RAD(90),RAD(0),RAD(0))*CF(0,-PART.Size.Y/2,0) | |
690 | end | |
691 | LASTBRANCH = PART | |
692 | end | |
693 | end | |
694 | end | |
695 | end | |
696 | if Dissapear == true then | |
697 | coroutine.resume(coroutine.create(function() | |
698 | for i = 1, 30 do | |
699 | Swait() | |
700 | for _, c in pairs(LIGHTNINGMODEL:GetChildren()) do | |
701 | if c.ClassName == "Part" then | |
702 | c.Transparency = i/30 | |
703 | end | |
704 | end | |
705 | end | |
706 | LIGHTNINGMODEL:remove() | |
707 | end)) | |
708 | elseif Dissapear == false then | |
709 | Debris:AddItem(LIGHTNINGMODEL,0.1) | |
710 | end | |
711 | return {End = LastBolt.CFrame*CF(0,0,-LastBolt.Size.Z/2).p,LastBolt = LastBolt,Model = LIGHTNINGMODEL} | |
712 | end | |
713 | ||
714 | local Particle = IT("ParticleEmitter",nil) | |
715 | Particle.Enabled = false | |
716 | Particle.LightEmission = 1 | |
717 | Particle.Rate = 150 | |
718 | Particle.ZOffset = 1 | |
719 | Particle.Rotation = NumberRange.new(-180, 180) | |
720 | ||
721 | --ParticleEmitter({Speed = 5, RotSpeed = NumberRange.new(-15, 15), Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false, Color1 = C3(1,1,1), Color2 = C3(1,1,1), Texture = ""}) | |
722 | function ParticleEmitter(Table) | |
723 | local PRTCL = Particle:Clone() | |
724 | local Color1 = Table.Color1 or C3(1,1,1) | |
725 | local Color2 = Table.Color2 or C3(1,1,1) | |
726 | local Speed = Table.Speed or 5 | |
727 | local Drag = Table.Drag or 0 | |
728 | local Size1 = Table.Size1 or 1 | |
729 | local Size2 = Table.Size2 or 5 | |
730 | local Lifetime1 = Table.Lifetime1 or 1 | |
731 | local Lifetime2 = Table.Lifetime2 or 1.5 | |
732 | local Parent = Table.Parent or Torso | |
733 | local Emit = Table.Emit or 100 | |
734 | local Offset = Table.Offset or 360 | |
735 | local Acel = Table.Acel or VT(0,0,0) | |
736 | local Enabled = Table.Enabled or false | |
737 | local Texture = Table.Texture or "281983280" | |
738 | local RotS = Table.RotSpeed or NumberRange.new(-15, 15) | |
739 | local Trans1 = Table.Transparency1 or 0 | |
740 | local Trans2 = Table.Transparency2 or 0 | |
741 | PRTCL.Parent = Parent | |
742 | PRTCL.RotSpeed = RotS | |
743 | PRTCL.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,Trans1),NumberSequenceKeypoint.new(1,Trans2)}) | |
744 | PRTCL.Texture = "http://www.roblox.com/asset/?id="..Texture | |
745 | PRTCL.Color = ColorSequence.new(Color1,Color2) | |
746 | PRTCL.Size = NumberSequence.new(Size1,Size2) | |
747 | PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2) | |
748 | PRTCL.Speed = NumberRange.new(Speed) | |
749 | PRTCL.VelocitySpread = Offset | |
750 | PRTCL.Drag = Drag | |
751 | PRTCL.Acceleration = Acel | |
752 | if Enabled == false then | |
753 | PRTCL:Emit(Emit) | |
754 | Debris:AddItem(PRTCL,Lifetime2) | |
755 | else | |
756 | PRTCL.Enabled = true | |
757 | end | |
758 | return PRTCL | |
759 | end | |
760 | ||
761 | --//=================================\\ | |
762 | --|| WEAPON CREATION | |
763 | --\\=================================// | |
764 | ||
765 | local SKILLTEXTCOLOR = C3(1,1,1) | |
766 | local SKILLFONT = "Fantasy" | |
767 | local SKILLTEXTSIZE = 5 | |
768 | local POWER = 9999999999999999999999 | |
769 | local MAXPOWER = 9999999999999999999999 | |
770 | ||
771 | Humanoid.Died:connect(function() | |
772 | ATTACK = true | |
773 | end) | |
774 | ||
775 | local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.01, 0, 0.83, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame") | |
776 | local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.012, 0, 0.78, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame") | |
777 | local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.03, 0, 0.73, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame") | |
778 | local SHIFTFR = CreateFrame(WEAPONGUI, 1, 2, UD2(0.30, 0, 0.87, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Charging") | |
779 | ||
780 | local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Q] Poison Bolt", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 1") | |
781 | local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[R] Toxic Stomp", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 2") | |
782 | local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[X] Toxic Devastation", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "Text 3") | |
783 | local SHIFTX = CreateLabel(SHIFTFR, "[SHIFT] Charge", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "How2Shift") | |
784 | ||
785 | local MANABAR = CreateFrame(WEAPONGUI, 0.5, 1, UD2(0.1, 0, 0.90, 0), UD2(0.26, 0, 0.02, 0), C3(0,0,0), C3(0, 0, 0),"Mana Bar") | |
786 | local MANACOVER = CreateFrame(MANABAR, 0, 0, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), BRICKC"Dark indigo".Color, C3(0, 0, 0),"Mana Cover") | |
787 | local MANATEXT = CreateLabel(MANABAR, POWER.."/"..MAXPOWER, SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "MP") | |
788 | ||
789 | local A = IT("Attachment",Torso) | |
790 | local TORSOTHUNDER = ParticleEmitter({Speed = 0.2, RotSpeed = NumberRange.new(-15, 15), Drag = 2, Size1 = 4, Size2 = 6, Lifetime1 = 0.01, Lifetime2 = 0.1, Parent = A, Emit = 100, Offset = 360, Enabled = true, Color1 = BRICKC"Dark indigo".Color, Color2 = BRICKC"Royal purple".Color}) | |
791 | TORSOTHUNDER.Enabled = false | |
792 | TORSOTHUNDER.Rate = 5 | |
793 | local TORSOTHUNDER2 = ParticleEmitter({Texture = 281983242, Speed = 0.2, RotSpeed = NumberRange.new(-15, 15), Drag = 2, Size1 = 4, Size2 = 6, Lifetime1 = 0.01, Lifetime2 = 0.1, Parent = A, Emit = 100, Offset = 360, Enabled = true, Color1 = BRICKC"Dark indigo".Color, Color2 = BRICKC"Royal purple".Color}) | |
794 | TORSOTHUNDER2.Enabled = false | |
795 | TORSOTHUNDER2.Rate = 5 | |
796 | local B = IT("Attachment",RootPart) | |
797 | B.Position = VT(0,-3,0) | |
798 | local CHARGE = ParticleEmitter({Transparency1 = 1, Transparency2 = 0.5, Acel = VT(0,15,0), Texture = 301261210, Speed = 3, RotSpeed = NumberRange.new(-150, 150), Drag = -0.5, Size1 = 2, Size2 = 0, Lifetime1 = 1, Lifetime2 = 1.2, Parent = B, Emit = 100, Offset = 360, Enabled = true, Color1 = BRICKC"Dark indigo".Color, Color2 = BRICKC"Royal purple".Color}) | |
799 | CHARGE.ZOffset = 1.5 | |
800 | CHARGE.Enabled = false | |
801 | CHARGE.Rate = 999 | |
802 | ||
803 | local FF = IT("ForceField",Character) | |
804 | FF.Visible = false | |
805 | Humanoid.MaxHealth = 999999999999999999999999 | |
806 | Humanoid.Health = 999999999999999999999999 | |
807 | local HEALTHBAR = CreateFrame(WEAPONGUI, 0.5, 1, UD2(0.1, 0, 0.93, 0), UD2(0.26, 0, 0.02, 0), C3(0,0,0), C3(0, 0, 0),"Health Bar") | |
808 | local HEALTHCOVER = CreateFrame(HEALTHBAR, 0, 0, UD2(0, 0, 0, 0), UD2(0, 0, 1, 0), BRICKC"Shamrock".Color, C3(0, 0, 0),"Health Cover") | |
809 | local HEALTHTEXT = CreateLabel(HEALTHBAR, Humanoid.Health.."/"..Humanoid.MaxHealth, SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0, "HP") | |
810 | Character.Health:remove() | |
811 | ||
812 | --//=================================\\ | |
813 | --|| DAMAGING | |
814 | --\\=================================// | |
815 | ||
816 | function ApplyDamage(Humanoid,Damage,TorsoPart) | |
817 | local defence = Instance.new("BoolValue",Humanoid.Parent) | |
818 | defence.Name = ("HitBy"..Player.Name) | |
819 | game:GetService("Debris"):AddItem(defence, 0.001) | |
820 | Damage = Damage * DAMAGEMULTIPLIER | |
821 | if Humanoid.Health ~= 0 then | |
822 | local CritChance = MRANDOM(1,100) | |
823 | if Damage > Humanoid.Health then | |
824 | Damage = math.ceil(Humanoid.Health) | |
825 | if Damage == 0 then | |
826 | Damage = 0.1 | |
827 | end | |
828 | end | |
829 | Humanoid.Health = Humanoid.Health - Damage | |
830 | end | |
831 | end | |
832 | ||
833 | function AfterZap(Humanoid,Times,Dmg) | |
834 | coroutine.resume(coroutine.create(function() | |
835 | if Humanoid ~= nil then | |
836 | local ZAP = ParticleEmitter({Speed = 0.2, RotSpeed = NumberRange.new(-15, 15), Drag = 2, Size1 = 2, Size2 = 3, Lifetime1 = 0.01, Lifetime2 = 0.1, Parent = Humanoid.Torso, Emit = 100, Offset = 360, Enabled = true, Color1 = BRICKC"Dark indigo".Color, Color2 = BRICKC"Royal purple".Color}) | |
837 | ZAP.Rate = 75 | |
838 | for i = 1, Times do | |
839 | wait(1) | |
840 | if Humanoid ~= nil and Humanoid.Health > 0 then | |
841 | Humanoid.Health = Humanoid.Health - Dmg | |
842 | CreateSound(SHOCKSOUND,Humanoid.Torso,1,MRANDOM(13,16)/10,false) | |
843 | else | |
844 | break | |
845 | end | |
846 | end | |
847 | ZAP.Enabled = false | |
848 | Debris:AddItem(ZAP,3) | |
849 | end | |
850 | end)) | |
851 | end | |
852 | ||
853 | function ApplyAoE(POSITION,RANGE,MINDMG,MAXDMG,FLING,DOESAFTERZAP,ZAPCOUNTER) | |
854 | local CHILDREN = workspace:GetDescendants() | |
855 | for index, CHILD in pairs(CHILDREN) do | |
856 | if CHILD.ClassName == "Model" and CHILD ~= Character then | |
857 | local HUM = CHILD:FindFirstChildOfClass("Humanoid") | |
858 | if HUM then | |
859 | local TORSO = CHILD:FindFirstChild("Torso") or CHILD:FindFirstChild("UpperTorso") | |
860 | if TORSO then | |
861 | if (TORSO.Position - POSITION).Magnitude <= RANGE then | |
862 | if DOESAFTERZAP == true then | |
863 | AfterZap(HUM,ZAPCOUNTER,math.ceil(MINDMG/7)) | |
864 | end | |
865 | local DMG = MRANDOM(MINDMG,MAXDMG) | |
866 | ApplyDamage(HUM,DMG,TORSO) | |
867 | if FLING > 0 then | |
868 | for _, c in pairs(CHILD:GetChildren()) do | |
869 | if c:IsA("BasePart") then | |
870 | local bv = Instance.new("BodyVelocity") | |
871 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
872 | bv.velocity = CF(POSITION,TORSO.Position).lookVector*FLING | |
873 | bv.Parent = c | |
874 | Debris:AddItem(bv,0.05) | |
875 | end | |
876 | end | |
877 | end | |
878 | end | |
879 | end | |
880 | end | |
881 | end | |
882 | end | |
883 | end | |
884 | ||
885 | --//=================================\\ | |
886 | --|| ATTACK FUNCTIONS AND STUFF | |
887 | --\\=================================// | |
888 | ||
889 | local DECAL = IT("Decal",nil) | |
890 | ||
891 | function MagicRing(PART,CFRAME) | |
892 | local RING = CreatePart(3, Effects, "Granite", 0, 1, "Maroon", "MagicRing", VT(0,0,0),false) | |
893 | local WELD = CreateWeldOrSnapOrMotor("Weld", PART, PART, RING, CFRAME, CF(0, 0, 0)) | |
894 | local MESH = IT("BlockMesh",RING) | |
895 | local BOTTOMTEXTURE = DECAL:Clone() | |
896 | BOTTOMTEXTURE.Parent = RING | |
897 | BOTTOMTEXTURE.Face = "Bottom" | |
898 | BOTTOMTEXTURE.Texture = "http://www.roblox.com/asset/?id=1563007449" | |
899 | BOTTOMTEXTURE.Name = "BottomTexture" | |
900 | local TOPTEXTURE = DECAL:Clone() | |
901 | TOPTEXTURE.Parent = RING | |
902 | TOPTEXTURE.Face = "Top" | |
903 | TOPTEXTURE.Texture = "http://www.roblox.com/asset/?id=1563008191" | |
904 | TOPTEXTURE.Name = "TopTexture" | |
905 | local T = ParticleEmitter({Transparency1 = 0.2, Transparency2 = 1, Texture = 1084975295, Speed = 0, RotSpeed = NumberRange.new(-15, 15), Drag = 2, Size1 = 0, Size2 = 10, Lifetime1 = 1, Lifetime2 = 1, Parent = RING, Emit = 25, Offset = 360, Enabled = false, Color1 = BRICKC"Dark indigo".Color, Color2 = BRICKC"Royal purple".Color}) | |
906 | T.LockedToPart = true | |
907 | return RING,WELD,MESH | |
908 | end | |
909 | ||
910 | function Charge() | |
911 | ATTACK = true | |
912 | Rooted = true | |
913 | TORSOTHUNDER.Enabled = true | |
914 | TORSOTHUNDER2.Enabled = true | |
915 | CHARGE.Enabled = true | |
916 | local LOOP = CreateSound(516142778,Torso,0,1,true) | |
917 | local LOOP2 = CreateSound(1393698948,Torso,0,2,true) | |
918 | repeat | |
919 | Swait() | |
920 | if POWER < MAXPOWER then | |
921 | POWER = POWER + 1 | |
922 | elseif POWER > MAXPOWER then | |
923 | POWER = MAXPOWER | |
924 | end | |
925 | if LOOP.Volume < 5 then | |
926 | LOOP.Volume = LOOP.Volume + 0.2 | |
927 | end | |
928 | if LOOP2.Volume < 5 then | |
929 | LOOP2.Volume = LOOP2.Volume + 0.2 | |
930 | end | |
931 | TORSOTHUNDER.Rate = MRANDOM(15,45) | |
932 | TORSOTHUNDER2.Rate = MRANDOM(15,45) | |
933 | Humanoid.Health = Humanoid.Health + 1 | |
934 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
935 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
936 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-15), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
937 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
938 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(0), RAD(85), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed) | |
939 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(0), RAD(-85), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 1 / Animation_Speed) | |
940 | until KEYHOLD == false or POWER == MAXPOWER and Humanoid.Health == Humanoid.MaxHealth | |
941 | CHARGE.Enabled = false | |
942 | TORSOTHUNDER.Enabled = false | |
943 | TORSOTHUNDER2.Enabled = false | |
944 | coroutine.resume(coroutine.create(function() | |
945 | repeat | |
946 | Swait() | |
947 | LOOP.Volume = LOOP.Volume - 0.2 | |
948 | LOOP2.Volume = LOOP2.Volume - 0.2 | |
949 | until LOOP.Volume <= 0 | |
950 | LOOP:remove() | |
951 | end)) | |
952 | ATTACK = false | |
953 | Rooted = false | |
954 | end | |
955 | ||
956 | function PoisonBolt() | |
957 | ATTACK = true | |
958 | Rooted = true | |
959 | local STRENGTH = 100 | |
960 | local TIER = 1 | |
961 | local GRAV = IT("BodyPosition",RootPart) | |
962 | GRAV.D = 250 | |
963 | GRAV.P = 20000 | |
964 | GRAV.MaxForce = VT(math.huge,math.huge,math.huge) | |
965 | GRAV.Position = RootPart.Position | |
966 | local G = IT("BodyGyro",RootPart) | |
967 | G.D = 250 | |
968 | G.P = 200000 | |
969 | G.MaxTorque = VT(math.huge,math.huge,math.huge) | |
970 | local RING,WELD,MESH = MagicRing(RightArm,CF(0,-1.2,0)) | |
971 | CreateSound(RINGSOUND,RING,5,1,false) | |
972 | repeat | |
973 | Swait() | |
974 | STRENGTH = STRENGTH + 0.3 | |
975 | if STRENGTH > 200 then | |
976 | STRENGTH = 200 | |
977 | end | |
978 | if MESH.Scale.X < 120 then | |
979 | MESH.Scale = MESH.Scale + VT(3,0,3) | |
980 | elseif MESH.Scale.X < 200 then | |
981 | MESH.Scale = MESH.Scale + VT(0.3,0,0.3) | |
982 | end | |
983 | G.cframe = CF(RootPart.Position,Mouse.Hit.p) | |
984 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(45)), 1 / Animation_Speed) | |
985 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 1 / Animation_Speed) | |
986 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.25, 0.5, -0.2) * ANGLES(RAD(90), RAD(0), RAD(45)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
987 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
988 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(74), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
989 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-74), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
990 | until KEYHOLD == false and MESH.Scale.X >= 120 | |
991 | if STRENGTH >= 150 and STRENGTH ~= 200 and POWER >= 35 then | |
992 | POWER = POWER - 35 | |
993 | TIER = 2 | |
994 | elseif STRENGTH == 200 and POWER >= 75 then | |
995 | POWER = POWER - 75 | |
996 | TIER = 3 | |
997 | end | |
998 | --print("STRENGTH:"..STRENGTH.."/TIER:"..TIER) | |
999 | if TIER == 1 then | |
1000 | local ZAP = Lightning({Color = BRICKC"Dark indigo".Color, Start = RING.Position, End = Mouse.Hit.p, SegmentL = 2, Thickness = 0.1, DoesFade = true, Ignore = Character, MaxDist = 100, Branches = false}) | |
1001 | if ZAP.End ~= nil then | |
1002 | ApplyAoE(ZAP.End,10,5,15,35,true,6) | |
1003 | WACKYEFFECT({EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(8,8,8)*2, Transparency = 0, Transparency2 = 1, CFrame = CF(ZAP.End), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark indigo".Color, SoundID = SHOCKSOUND, SoundPitch = MRANDOM(9,11)/10, SoundVolume = 6}) | |
1004 | WACKYEFFECT({Time = 65, EffectType = "Cloud", Size = VT(1,1,1), Size2 = VT(5,5,5), Transparency = 0.5, Transparency2 = 1, CFrame = CF(ZAP.End) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = MRANDOM(-100,100)/150, RotationY = MRANDOM(-100,100)/150, RotationZ = MRANDOM(-100,100)/150, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = 3}) | |
1005 | end | |
1006 | elseif TIER == 2 then | |
1007 | local ZAP = Lightning({Color = BRICKC"Dark indigo".Color, Start = RING.Position, End = Mouse.Hit.p, SegmentL = 2.5, Thickness = 0.1, DoesFade = true, Ignore = Character, MaxDist = 200, Branches = false}) | |
1008 | if ZAP.End ~= nil then | |
1009 | ApplyAoE(ZAP.End,15,15,25,35,true,8) | |
1010 | WACKYEFFECT({EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(8,8,8)*4, Transparency = 0, Transparency2 = 1, CFrame = CF(ZAP.End), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark indigo".Color, SoundID = SHOCKSOUND, SoundPitch = MRANDOM(7,10)/10, SoundVolume = 6}) | |
1011 | WACKYEFFECT({Time = 75, EffectType = "Cloud", Size = VT(1,1,1), Size2 = VT(5,5,5)*2, Transparency = 0.5, Transparency2 = 1, CFrame = CF(ZAP.End) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = MRANDOM(-100,100)/150, RotationY = MRANDOM(-100,100)/150, RotationZ = MRANDOM(-100,100)/150, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = 3}) | |
1012 | end | |
1013 | elseif TIER == 3 then | |
1014 | local ZAP = Lightning({Color = BRICKC"Dark indigo".Color, Start = RING.Position, End = Mouse.Hit.p, SegmentL = 3, Thickness = 0.1, DoesFade = true, Ignore = Character, MaxDist = 300, Branches = true}) | |
1015 | if ZAP.End ~= nil then | |
1016 | ApplyAoE(ZAP.End,20,15,25,35,true,12) | |
1017 | WACKYEFFECT({EffectType = "Sphere", Size = VT(1,1,1), Size2 = VT(8,8,8)*8, Transparency = 0, Transparency2 = 1, CFrame = CF(ZAP.End), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark indigo".Color, SoundID = SHOCKSOUND, SoundPitch = MRANDOM(5,8)/10, SoundVolume = 6}) | |
1018 | WACKYEFFECT({Time = 125, EffectType = "Cloud", Size = VT(1,1,1), Size2 = VT(5,5,5)*4, Transparency = 0.5, Transparency2 = 1, CFrame = CF(ZAP.End) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = MRANDOM(-100,100)/150, RotationY = MRANDOM(-100,100)/150, RotationZ = MRANDOM(-100,100)/150, Material = "Neon", Color = C3(0,0,0), SoundID = nil, SoundPitch = MRANDOM(9,11)/10, SoundVolume = 3}) | |
1019 | for i = 1, 4 do | |
1020 | Lightning({Color = BRICKC"Dark indigo".Color, Start = ZAP.End, End = ZAP.End+VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45)), SegmentL = 3, Thickness = 0.1, DoesFade = true, Ignore = Character, MaxDist = 15, Branches = false}) | |
1021 | end | |
1022 | end | |
1023 | end | |
1024 | wait(0.5) | |
1025 | RING.Anchored = true | |
1026 | WELD:remove() | |
1027 | coroutine.resume(coroutine.create(function() | |
1028 | for i = 1, 25 do | |
1029 | Swait() | |
1030 | RING.TopTexture.Transparency = RING.TopTexture.Transparency + 1/25 | |
1031 | RING.BottomTexture.Transparency = RING.BottomTexture.Transparency + 1/25 | |
1032 | MESH.Scale = MESH.Scale - VT(3,0,3) | |
1033 | end | |
1034 | RING:remove() | |
1035 | end)) | |
1036 | ATTACK = false | |
1037 | Rooted = false | |
1038 | G:remove() | |
1039 | GRAV:remove() | |
1040 | end | |
1041 | ||
1042 | function ToxicStomp() | |
1043 | ATTACK = true | |
1044 | Rooted = false | |
1045 | local GRAV = IT("BodyPosition",RootPart) | |
1046 | GRAV.D = 250 | |
1047 | GRAV.P = 20000 | |
1048 | GRAV.MaxForce = VT(math.huge,math.huge,math.huge) | |
1049 | GRAV.Position = RootPart.Position | |
1050 | local RING,WELD,MESH = MagicRing(RightLeg,CF(0,-1.2,0)) | |
1051 | CreateSound(RINGSOUND,RING,5,1,false) | |
1052 | local STRENGTH = 100 | |
1053 | local TIER = 1 | |
1054 | repeat | |
1055 | Swait() | |
1056 | STRENGTH = STRENGTH + 0.3 | |
1057 | if STRENGTH > 200 then | |
1058 | STRENGTH = 200 | |
1059 | end | |
1060 | if MESH.Scale.X < 120 then | |
1061 | MESH.Scale = MESH.Scale + VT(3,0,3) | |
1062 | elseif MESH.Scale.X < 200 then | |
1063 | MESH.Scale = MESH.Scale + VT(0.3,0,0.3) | |
1064 | end | |
1065 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1066 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1067 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(120), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1068 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(120), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1069 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.25, -0.65) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1070 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(-15), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1071 | until KEYHOLD == false and MESH.Scale.X >= 120 | |
1072 | if STRENGTH >= 150 and STRENGTH ~= 200 and POWER >= 45 then | |
1073 | POWER = POWER - 45 | |
1074 | TIER = 2 | |
1075 | elseif STRENGTH == 200 and POWER >= 100 then | |
1076 | POWER = POWER - 100 | |
1077 | TIER = 3 | |
1078 | end | |
1079 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1080 | Swait() | |
1081 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(-25), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1082 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1083 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(150), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1084 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(150), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1085 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.25, -0.65) * ANGLES(RAD(10), RAD(90), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1086 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(-15), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1087 | end | |
1088 | for i=0, 0.2, 0.1 / Animation_Speed do | |
1089 | Swait() | |
1090 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0.6) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1091 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1092 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(120), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1093 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(120), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1094 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.5) * ANGLES(RAD(20), RAD(90), RAD(0)) * ANGLES(RAD(-1), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1095 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(-25), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1096 | end | |
1097 | coroutine.resume(coroutine.create(function() | |
1098 | if TIER == 1 then | |
1099 | local AOE = CreatePart(3, Effects, "Granite", 0, 1, "Maroon", "Stomp", VT(30,0,30)) | |
1100 | AOE.CFrame = CF(RightLeg.Position-VT(0,1,0)) | |
1101 | local PARTCL = ParticleEmitter({Texture = 281983280, Speed = 0.2, RotSpeed = NumberRange.new(-15, 15), Drag = 2, Size1 = 4, Size2 = 6, Lifetime1 = 0.01, Lifetime2 = 0.1, Parent = AOE, Emit = 100, Offset = 360, Enabled = true, Color1 = BRICKC"Dark indigo".Color, Color2 = BRICKC"Royal purple".Color}) | |
1102 | PARTCL.Rate = 999 | |
1103 | CreateSound(304999618,AOE,5,1,false) | |
1104 | CreateSound(130972023,AOE,4,1,false) | |
1105 | ApplyAoE(AOE.Position,15,15,25,35,true,5) | |
1106 | WACKYEFFECT({EffectType = "Wave", Size = VT(11,1,11), Size2 = VT(45,3,45), Transparency = 0, Transparency2 = 1, CFrame = CF(AOE.Position), MoveToPos = nil, RotationX = 0, RotationY = 15, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark indigo".Color, SoundID = nil, SoundPitch = MRANDOM(5,8)/10, SoundVolume = 6}) | |
1107 | wait(2) | |
1108 | PARTCL.Enabled = false | |
1109 | Debris:AddItem(AOE,2) | |
1110 | elseif TIER == 2 then | |
1111 | local AOE = CreatePart(3, Effects, "Granite", 0, 1, "Maroon", "Stomp", VT(40,0,40)) | |
1112 | AOE.CFrame = CF(RightLeg.Position-VT(0,1,0)) | |
1113 | local PARTCL = ParticleEmitter({Texture = 281983280, Speed = 0.2, RotSpeed = NumberRange.new(-15, 15), Drag = 2, Size1 = 4, Size2 = 6, Lifetime1 = 0.01, Lifetime2 = 0.1, Parent = AOE, Emit = 100, Offset = 360, Enabled = true, Color1 = BRICKC"Dark indigo".Color, Color2 = BRICKC"Royal purple".Color}) | |
1114 | PARTCL.Rate = 999 | |
1115 | CreateSound(304999618,AOE,5,1,false) | |
1116 | CreateSound(130972023,AOE,4,1,false) | |
1117 | ApplyAoE(AOE.Position,20,25,35,35,true,6) | |
1118 | WACKYEFFECT({EffectType = "Wave", Size = VT(11,1,11), Size2 = VT(55,3,55), Transparency = 0, Transparency2 = 1, CFrame = CF(AOE.Position), MoveToPos = nil, RotationX = 0, RotationY = 15, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark indigo".Color, SoundID = nil, SoundPitch = MRANDOM(5,8)/10, SoundVolume = 6}) | |
1119 | wait(2) | |
1120 | PARTCL.Enabled = false | |
1121 | Debris:AddItem(AOE,2) | |
1122 | elseif TIER == 3 then | |
1123 | local AOE = CreatePart(3, Effects, "Granite", 0, 1, "Maroon", "Stomp", VT(50,0,50)) | |
1124 | AOE.CFrame = CF(RightLeg.Position-VT(0,1,0)) | |
1125 | local PARTCL = ParticleEmitter({Texture = 281983280, Speed = 0.2, RotSpeed = NumberRange.new(-15, 15), Drag = 2, Size1 = 4, Size2 = 6, Lifetime1 = 0.01, Lifetime2 = 0.1, Parent = AOE, Emit = 100, Offset = 360, Enabled = true, Color1 = BRICKC"Dark indigo".Color, Color2 = BRICKC"Royal purple".Color}) | |
1126 | PARTCL.Rate = 999 | |
1127 | CreateSound(304999618,AOE,5,1,false) | |
1128 | CreateSound(130972023,AOE,4,1,false) | |
1129 | for i = 1, 3 do | |
1130 | ApplyAoE(AOE.Position,30,5,15,5,true,7)WACKYEFFECT({EffectType = "Wave", Size = VT(11,1,11), Size2 = VT(55,3,55), Transparency = 0, Transparency2 = 1, CFrame = CF(AOE.Position), MoveToPos = nil, RotationX = 0, RotationY = 15, RotationZ = 0, Material = "Neon", Color = BRICKC"Dark indigo".Color, SoundID = nil, SoundPitch = MRANDOM(5,8)/10, SoundVolume = 6}) | |
1131 | wait(0.5) | |
1132 | end | |
1133 | wait(1.5) | |
1134 | PARTCL.Enabled = false | |
1135 | Debris:AddItem(AOE,2) | |
1136 | end | |
1137 | end)) | |
1138 | for i=0, 2, 0.1 / Animation_Speed do | |
1139 | Swait() | |
1140 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0.6) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1141 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1142 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(120), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1143 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(120), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1144 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.5) * ANGLES(RAD(20), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1145 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(-25), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1146 | end | |
1147 | RING.Anchored = true | |
1148 | WELD:remove() | |
1149 | coroutine.resume(coroutine.create(function() | |
1150 | for i = 1, 25 do | |
1151 | Swait() | |
1152 | RING.TopTexture.Transparency = RING.TopTexture.Transparency + 1/25 | |
1153 | RING.BottomTexture.Transparency = RING.BottomTexture.Transparency + 1/25 | |
1154 | MESH.Scale = MESH.Scale - VT(3,0,3) | |
1155 | end | |
1156 | RING:remove() | |
1157 | end)) | |
1158 | GRAV:remove() | |
1159 | ATTACK = false | |
1160 | Rooted = false | |
1161 | end | |
1162 | ||
1163 | function ToxicDevastation() | |
1164 | ATTACK = true | |
1165 | Rooted = false | |
1166 | Speed = 5 | |
1167 | local STRENGTH = 50 | |
1168 | local TIER = 1 | |
1169 | for i=0, 1, 0.1 / Animation_Speed do | |
1170 | Swait() | |
1171 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1.5) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1172 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1173 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1174 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-15), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1175 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.15, -0.5) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1176 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(-90), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1177 | end | |
1178 | local POS = RootPart.Position | |
1179 | Rooted = true | |
1180 | Speed = Walkspeed | |
1181 | local TIMER = 0 | |
1182 | local bv = Instance.new("BodyVelocity") | |
1183 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1184 | bv.velocity = CF(RootPart.Position,RootPart.Position+VT(0,5,0)).lookVector*150 | |
1185 | bv.Parent = RootPart | |
1186 | WACKYEFFECT({EffectType = "Wave", Size = VT(0,0,0), Size2 = VT(5,1,5), Transparency = 0, Transparency2 = 1, CFrame = CF(RootPart.Position+VT(0,-3.5,0)), MoveToPos = nil, RotationX = 0, RotationY = 5, RotationZ = 0, Material = "Neon", Color = BRICKC"Pearl".Color, SoundID = 1112042117, SoundPitch = MRANDOM(5,8)/10, SoundVolume = 6}) | |
1187 | repeat | |
1188 | Swait() | |
1189 | TIMER = TIMER + 1 | |
1190 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1191 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1192 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1193 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1194 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1195 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1196 | until RootPart.Position.Y > POS.Y+80 or TIMER > 100 | |
1197 | local GRAV = IT("BodyPosition",RootPart) | |
1198 | GRAV.D = 250 | |
1199 | GRAV.P = 20000 | |
1200 | GRAV.MaxForce = VT(math.huge,math.huge,math.huge) | |
1201 | GRAV.Position = RootPart.Position | |
1202 | bv:remove() | |
1203 | local G = IT("BodyGyro",RootPart) | |
1204 | G.D = 250 | |
1205 | G.P = 200000 | |
1206 | G.MaxTorque = VT(math.huge,math.huge,math.huge) | |
1207 | local RING,WELD,MESH = MagicRing(Torso,CF(0,3,0)) | |
1208 | CreateSound(RINGSOUND,RING,5,1,false) | |
1209 | local ORB = CreatePart(3, Effects, "Neon", 0, 0, "Royal purple", "Ball", VT(3,3,3)) | |
1210 | MakeForm(ORB,"Ball") | |
1211 | local LOOP = 0 | |
1212 | repeat | |
1213 | Swait() | |
1214 | LOOP = LOOP + 1 | |
1215 | ORB.CFrame = Torso.CFrame*CF(0,4+ORB.Size.X/2,0) | |
1216 | STRENGTH = STRENGTH + 0.3 | |
1217 | if STRENGTH > 200 then | |
1218 | STRENGTH = 200 | |
1219 | else | |
1220 | ORB.Size = ORB.Size + VT(0.02,0.02,0.02) | |
1221 | end | |
1222 | if MESH.Scale.X < 120 then | |
1223 | MESH.Scale = MESH.Scale + VT(5,0,5) | |
1224 | elseif MESH.Scale.X < 200 then | |
1225 | MESH.Scale = MESH.Scale + VT(0.6,0,0.6) | |
1226 | end | |
1227 | if LOOP == 4 then | |
1228 | LOOP = 0 | |
1229 | POWER = POWER - 1 | |
1230 | end | |
1231 | if MRANDOM(1,25) == 1 then | |
1232 | Lightning({Color = ORB.Color, Start = ORB.Position, End = ORB.Position+VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45)), SegmentL = 1, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = ORB.Size.X, Branches = false}) | |
1233 | end | |
1234 | G.cframe = CF(RootPart.Position,Mouse.Hit.p) | |
1235 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1236 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1237 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(170), RAD(0), RAD(15)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1238 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(170), RAD(0), RAD(-15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1239 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(74), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1240 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-74), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1241 | until (KEYHOLD == false and MESH.Scale.X >= 170) or POWER == 0 | |
1242 | if STRENGTH >= 150 and STRENGTH ~= 200 then | |
1243 | TIER = 2 | |
1244 | elseif STRENGTH == 200 then | |
1245 | TIER = 3 | |
1246 | end | |
1247 | coroutine.resume(coroutine.create(function() | |
1248 | ORB.CFrame = CF(ORB.Position,Mouse.Hit.p) | |
1249 | CreateSound(1112042117,ORB,5,0.8,false) | |
1250 | for i = 1, 200 do | |
1251 | Swait() | |
1252 | ORB.CFrame = ORB.CFrame*CF(0,0,-2) | |
1253 | if MRANDOM(1,5) == 1 then | |
1254 | Lightning({Color = ORB.Color, Start = ORB.Position, End = ORB.Position+VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45)), SegmentL = 1, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = ORB.Size.X, Branches = false}) | |
1255 | end | |
1256 | local HIT = Raycast(ORB.Position, ORB.CFrame.lookVector, ORB.Size.X/2, Character) | |
1257 | if HIT ~= nil then | |
1258 | ORB.Transparency = 1 | |
1259 | coroutine.resume(coroutine.create(function() | |
1260 | local COLOR = ORB.Color | |
1261 | local POS = ORB.Position | |
1262 | local SIZE = ORB.Size | |
1263 | local TIMES = 12 + TIER*3 | |
1264 | local FAKEORB = CreatePart(3, Effects, "Neon", 0, 0, "Royal purple", "Ball", ORB.Size) | |
1265 | FAKEORB.CFrame = CF(POS) | |
1266 | MakeForm(FAKEORB,"Ball") | |
1267 | local TIME = 0 | |
1268 | ApplyAoE(FAKEORB.Position,30+(25*TIER),15,25,0,true,10) | |
1269 | WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = FAKEORB.Size, Size2 = VT(35+(25*TIER),35+(25*TIER),35+(25*TIER)), Transparency = 0.8, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = COLOR, SoundID = 178452241, SoundPitch = 1, SoundVolume = 6}) | |
1270 | for i = 1, 5 do | |
1271 | WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(5,0,5), Size2 = VT(35+(25*TIER),3,35+(25*TIER)), Transparency = 0.5, Transparency2 = 1, CFrame = CF(POS) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = -5, RotationZ = 0, Material = "Neon", Color = COLOR, SoundID = nil, SoundPitch = 0.5, SoundVolume = 6}) | |
1272 | end | |
1273 | for i = 1, TIMES*20 do | |
1274 | TIME = TIME + 1 | |
1275 | wait() | |
1276 | if MRANDOM(1,math.ceil(5+(i/15))) == 1 then | |
1277 | Lightning({Color = ORB.Color, Start = FAKEORB.Position, End = FAKEORB.Position+VT(MRANDOM(-45,45),MRANDOM(-45,45),MRANDOM(-45,45)), SegmentL = 1, Thickness = 0.1, DoesFade = false, Ignore = Character, MaxDist = i/5, Branches = false}) | |
1278 | end | |
1279 | FAKEORB.Size = FAKEORB.Size - SIZE/(TIMES*20) | |
1280 | if TIME >= 20 then | |
1281 | TIME = 0 | |
1282 | ApplyAoE(FAKEORB.Position,30+(25*TIER),15,25,0,true,10) | |
1283 | WACKYEFFECT({Time = 35, EffectType = "Sphere", Size = FAKEORB.Size, Size2 = VT(35+(25*TIER),35+(25*TIER),35+(25*TIER)), Transparency = 0.8, Transparency2 = 1, CFrame = CF(POS), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = COLOR, SoundID = 178452241, SoundPitch = 1, SoundVolume = 6}) | |
1284 | for i = 1, 5 do | |
1285 | WACKYEFFECT({Time = 15, EffectType = "Wave", Size = VT(5,0,5), Size2 = VT(35+(25*TIER),3,35+(25*TIER)), Transparency = 0.5, Transparency2 = 1, CFrame = CF(POS) * ANGLES(RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360)), RAD(MRANDOM(0,360))), MoveToPos = nil, RotationX = 0, RotationY = -5, RotationZ = 0, Material = "Neon", Color = COLOR, SoundID = nil, SoundPitch = 0.5, SoundVolume = 6}) | |
1286 | end | |
1287 | end | |
1288 | end | |
1289 | FAKEORB:remove() | |
1290 | end)) | |
1291 | break | |
1292 | end | |
1293 | end | |
1294 | ORB:remove() | |
1295 | end)) | |
1296 | for i=0, 1, 0.1 / Animation_Speed do | |
1297 | Swait() | |
1298 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(5), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1299 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(15), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1300 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(-15)) * RIGHTSHOULDERC0, 1 / Animation_Speed) | |
1301 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(90), RAD(0), RAD(15)) * LEFTSHOULDERC0, 1 / Animation_Speed) | |
1302 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.5, -0.5) * ANGLES(RAD(0), RAD(74), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1303 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-74), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed) | |
1304 | end | |
1305 | coroutine.resume(coroutine.create(function() | |
1306 | for i = 1, 25 do | |
1307 | Swait() | |
1308 | RING.TopTexture.Transparency = RING.TopTexture.Transparency + 1/25 | |
1309 | RING.BottomTexture.Transparency = RING.BottomTexture.Transparency + 1/25 | |
1310 | MESH.Scale = MESH.Scale - VT(3,0,3) | |
1311 | end | |
1312 | RING:remove() | |
1313 | end)) | |
1314 | GRAV:remove() | |
1315 | G:remove() | |
1316 | ATTACK = false | |
1317 | Rooted = false | |
1318 | end | |
1319 | ||
1320 | --//=================================\\ | |
1321 | --|| ASSIGN THINGS TO KEYS | |
1322 | --\\=================================// | |
1323 | ||
1324 | function MouseDown(Mouse) | |
1325 | if ATTACK == false then | |
1326 | end | |
1327 | end | |
1328 | ||
1329 | function MouseUp(Mouse) | |
1330 | HOLD = false | |
1331 | end | |
1332 | ||
1333 | function KeyDown(Key) | |
1334 | KEYHOLD = true | |
1335 | if Key == "q" and ATTACK == false and POWER >= 50 then | |
1336 | POWER = POWER - 50 | |
1337 | PoisonBolt() | |
1338 | end | |
1339 | ||
1340 | if Key == "r" and ATTACK == false and POWER >= 125 then | |
1341 | POWER = POWER - 125 | |
1342 | ToxicStomp() | |
1343 | end | |
1344 | ||
1345 | if Key == "x" and ATTACK == false and POWER >= 250 then | |
1346 | POWER = POWER - 250 | |
1347 | ToxicDevastation() | |
1348 | end | |
1349 | ||
1350 | if string.byte(Key) == 48 and ATTACK == false and (POWER ~= MAXPOWER or Humanoid.Health ~= Humanoid.MaxHealth) then | |
1351 | Charge() | |
1352 | end | |
1353 | ||
1354 | if string.byte(Key) == 50 and ATTACK == false then | |
1355 | if Walkspeed == 16 then | |
1356 | Walkspeed = 30 | |
1357 | Speed = 30 | |
1358 | elseif Walkspeed == 30 then | |
1359 | Walkspeed = 16 | |
1360 | Speed = 16 | |
1361 | end | |
1362 | end | |
1363 | end | |
1364 | ||
1365 | function KeyUp(Key) | |
1366 | KEYHOLD = false | |
1367 | end | |
1368 | ||
1369 | Mouse.Button1Down:connect(function(NEWKEY) | |
1370 | MouseDown(NEWKEY) | |
1371 | end) | |
1372 | Mouse.Button1Up:connect(function(NEWKEY) | |
1373 | MouseUp(NEWKEY) | |
1374 | end) | |
1375 | Mouse.KeyDown:connect(function(NEWKEY) | |
1376 | KeyDown(NEWKEY) | |
1377 | end) | |
1378 | Mouse.KeyUp:connect(function(NEWKEY) | |
1379 | KeyUp(NEWKEY) | |
1380 | end) | |
1381 | ||
1382 | --//=================================\\ | |
1383 | --\\=================================// | |
1384 | ||
1385 | ||
1386 | function unanchor() | |
1387 | if UNANCHOR == true then | |
1388 | g = Character:GetChildren() | |
1389 | for i = 1, #g do | |
1390 | if g[i].ClassName == "Part" then | |
1391 | g[i].Anchored = false | |
1392 | end | |
1393 | end | |
1394 | end | |
1395 | end | |
1396 | ||
1397 | ||
1398 | --//=================================\\ | |
1399 | --|| WRAP THE WHOLE SCRIPT UP | |
1400 | --\\=================================// | |
1401 | ||
1402 | Humanoid.Changed:connect(function(Jump) | |
1403 | if Jump == "Jump" and (Disable_Jump == true) then | |
1404 | Humanoid.Jump = false | |
1405 | end | |
1406 | end) | |
1407 | ||
1408 | while true do | |
1409 | Swait() | |
1410 | script.Parent = WEAPONGUI | |
1411 | ANIMATE.Parent = nil | |
1412 | for _,v in next, Humanoid:GetPlayingAnimationTracks() do | |
1413 | v:Stop(); | |
1414 | end | |
1415 | SINE = SINE + CHANGE | |
1416 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
1417 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
1418 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
1419 | local WALKSPEEDVALUE = 5 | |
1420 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
1421 | if Humanoid.WalkSpeed <= 20 then | |
1422 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.05 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * 1 / Animation_Speed) | |
1423 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * 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) | |
1424 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.05 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(45 * COS(SINE / WALKSPEEDVALUE))), 0.5 / Animation_Speed) | |
1425 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.05 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(45 * COS(SINE / WALKSPEEDVALUE))), 0.5 / Animation_Speed) | |
1426 | else | |
1427 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / (2*1.3)))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * 1 / Animation_Speed) | |
1428 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / (2*1.3)))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1429 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE*1.3) - 0.15 * COS(SINE / WALKSPEEDVALUE*(2*1.3)), -0.125 * COS(SINE / WALKSPEEDVALUE*1.3) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE*1.3)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(75 * COS(SINE / WALKSPEEDVALUE*1.3))), 0.5 / Animation_Speed) | |
1430 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE*1.3) - 0.15 * COS(SINE / WALKSPEEDVALUE*(2*1.3)), 0.125 * COS(SINE / WALKSPEEDVALUE*1.3) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE*1.3)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(75 * COS(SINE / WALKSPEEDVALUE*1.3))), 0.5 / Animation_Speed) | |
1431 | end | |
1432 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
1433 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1434 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1435 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1436 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1437 | end | |
1438 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
1439 | ANIM = "Jump" | |
1440 | if ATTACK == false then | |
1441 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1442 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1443 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1444 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1445 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1446 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1447 | end | |
1448 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
1449 | ANIM = "Fall" | |
1450 | if ATTACK == false then | |
1451 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1452 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1453 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(60)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1454 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1455 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1456 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1457 | end | |
1458 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
1459 | ANIM = "Idle" | |
1460 | if ATTACK == false then | |
1461 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0 - 0.05 * COS(SINE / 12), 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1462 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1463 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(-15), RAD(5 + 1 * COS(SINE / 12))) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1464 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(15), RAD(-5 - 1 * COS(SINE / 12))) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1465 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(74), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1466 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(-2 + 2 * COS(SINE / 12)), RAD(-74), RAD(0)) * ANGLES(RAD(-2), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1467 | end | |
1468 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
1469 | ANIM = "Walk" | |
1470 | if ATTACK == false then | |
1471 | if Humanoid.WalkSpeed <= 20 then | |
1472 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1473 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1474 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(30 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.85 / Animation_Speed) | |
1475 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-30 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.85 / Animation_Speed) | |
1476 | RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed) | |
1477 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed) | |
1478 | elseif Humanoid.WalkSpeed > 20 then | |
1479 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(35), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1480 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-35), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1481 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(35), RAD(35), RAD(0)) * ANGLES(RAD(60 * COS(SINE / WALKSPEEDVALUE*1.3)), RAD(0), RAD(2)) * RIGHTSHOULDERC0, 2 / Animation_Speed) | |
1482 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(35), RAD(-35), RAD(0)) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE*1.3)), RAD(0), RAD(-2)) * LEFTSHOULDERC0, 2 / Animation_Speed) | |
1483 | RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(6)), 2 / Animation_Speed) | |
1484 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-6)), 2 / Animation_Speed) | |
1485 | end | |
1486 | end | |
1487 | end | |
1488 | unanchor() | |
1489 | if Rooted == false then | |
1490 | Disable_Jump = false | |
1491 | Humanoid.WalkSpeed = Speed | |
1492 | elseif Rooted == true then | |
1493 | Disable_Jump = true | |
1494 | Humanoid.WalkSpeed = 0 | |
1495 | end | |
1496 | sick.SoundId = "rbxassetid://598848368" | |
1497 | sick.Looped = true | |
1498 | sick.Pitch = 1 | |
1499 | sick.Volume = 3 | |
1500 | sick.Parent = Torso | |
1501 | sick.Playing = true | |
1502 | MANACOVER:TweenSize(UD2(1 * (POWER / MAXPOWER), 0, 1, 0), "Out", "Quad", 0.1, 0.1) | |
1503 | MANATEXT.Text = POWER.."/"..MAXPOWER | |
1504 | HEALTHCOVER:TweenSize(UD2(1 * (Humanoid.Health / Humanoid.MaxHealth), 0, 1, 0), "Out", "Quad", 0.1, 0.1) | |
1505 | HEALTHTEXT.Text = math.ceil(Humanoid.Health).."/"..Humanoid.MaxHealth | |
1506 | Humanoid.Health = Humanoid.Health + 0.05 | |
1507 | end | |
1508 | ||
1509 | --//=================================\\ | |
1510 | --\\=================================// | |
1511 | ||
1512 | ||
1513 | ||
1514 | ||
1515 | ||
1516 | --//====================================================\\-- | |
1517 | --|| END OF SCRIPT | |
1518 | --\\====================================================//-- |