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