SHOW:
|
|
- or go back to the newest paste.
1 | --[[ World eater Script ]]-- | |
2 | --[[ Declarations ]]-- | |
3 | ||
4 | -- This script has been converted to FE by iPxter | |
5 | ||
6 | ||
7 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
8 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
9 | do | |
10 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter") | |
11 | script.Parent = Player.Character | |
12 | ||
13 | --RemoteEvent for communicating | |
14 | local Event = Instance.new("RemoteEvent") | |
15 | Event.Name = "UserInput_Event" | |
16 | ||
17 | --Fake event to make stuff like Mouse.KeyDown work | |
18 | local function fakeEvent() | |
19 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
20 | t.connect = t.Connect | |
21 | return t | |
22 | end | |
23 | ||
24 | --Creating fake input objects with fake variables | |
25 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
26 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
27 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
28 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
29 | end} | |
30 | --Merged 2 functions into one by checking amount of arguments | |
31 | CAS.UnbindAction = CAS.BindAction | |
32 | ||
33 | --This function will trigger the events that have been :Connect()'ed | |
34 | local function te(self,ev,...) | |
35 | local t = m[ev] | |
36 | if t and t._fakeEvent and t.Function then | |
37 | t.Function(...) | |
38 | end | |
39 | end | |
40 | m.TrigEvent = te | |
41 | UIS.TrigEvent = te | |
42 | ||
43 | Event.OnServerEvent:Connect(function(plr,io) | |
44 | if plr~=Player then return end | |
45 | if io.isMouse then | |
46 | m.Target = io.Target | |
47 | m.Hit = io.Hit | |
48 | else | |
49 | local b = io.UserInputState == Enum.UserInputState.Begin | |
50 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
51 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
52 | end | |
53 | for _,t in pairs(CAS.Actions) do | |
54 | for _,k in pairs(t.Keys) do | |
55 | if k==io.KeyCode then | |
56 | t.Function(t.Name,io.UserInputState,io) | |
57 | end | |
58 | end | |
59 | end | |
60 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
61 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
62 | end | |
63 | end) | |
64 | Event.Parent = NLS([==[ | |
65 | local Player = game:GetService("Players").LocalPlayer | |
66 | local Event = script:WaitForChild("UserInput_Event") | |
67 | ||
68 | local UIS = game:GetService("UserInputService") | |
69 | local input = function(io,a) | |
70 | if a then return end | |
71 | --Since InputObject is a client-side instance, we create and pass table instead | |
72 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
73 | end | |
74 | UIS.InputBegan:Connect(input) | |
75 | UIS.InputEnded:Connect(input) | |
76 | ||
77 | local Mouse = Player:GetMouse() | |
78 | local h,t | |
79 | --Give the server mouse data 30 times every second, but only if the values changed | |
80 | --If player is not moving their mouse, client won't fire events | |
81 | while wait(1/30) do | |
82 | if h~=Mouse.Hit or t~=Mouse.Target then | |
83 | h,t=Mouse.Hit,Mouse.Target | |
84 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
85 | end | |
86 | end]==],Player.Character) | |
87 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
88 | end | |
89 | ||
90 | wait(.0000000000000000000001) | |
91 | local Player = owner | |
92 | local Character = Player.Character | |
93 | local Head = Character.Head | |
94 | local Torso = Character.Torso | |
95 | local Right_Arm = Character["Right Arm"] | |
96 | local Right_Leg = Character["Right Leg"] | |
97 | local Left_Arm = Character["Left Arm"] | |
98 | local Left_Leg = Character["Left Leg"] | |
99 | local Humanoid = Character.Humanoid | |
100 | local Animation = "Idle" | |
101 | local LeftShoulder = Torso["Left Shoulder"] | |
102 | local Left_Hip = Torso["Left Hip"] | |
103 | local RightShoulder = Torso["Right Shoulder"] | |
104 | local Right_Hip = Torso["Right Hip"] | |
105 | local Root = Character.HumanoidRootPart | |
106 | local RootJoint = Root.RootJoint | |
107 | local Attacking = false | |
108 | local CanAttack = true | |
109 | local Anim = "Idle" | |
110 | local Combo = 1 | |
111 | local Blocking = false | |
112 | local MaxDestruction = 1000 | |
113 | local Destruction = 0 | |
114 | local MaxBlock = 100 | |
115 | local Effects = {} | |
116 | local Color = "Bright yellow" | |
117 | local Invert = false | |
118 | local Idle = 0 | |
119 | local Equipped = false | |
120 | local Running = false | |
121 | local Unseathed = false | |
122 | local Shard = "None" | |
123 | ||
124 | Humanoid.MaxHealth = 3000 | |
125 | Humanoid.Health = 3000 | |
126 | ||
127 | local WorldEaterTheme = Instance.new("Sound",Character) | |
128 | WorldEaterTheme.Name = "WorldEaterTheme" | |
129 | WorldEaterTheme.Looped = true | |
130 | WorldEaterTheme.SoundId = "http://www.roblox.com/asset?id=149981769" | |
131 | WorldEaterTheme:Play() | |
132 | ||
133 | Left_Shoulder = Instance.new("Weld", Torso) | |
134 | Left_Shoulder.Part0 = Torso | |
135 | Left_Shoulder.Part1 = Left_Arm | |
136 | Left_Shoulder.Name = "Left Shoulder" | |
137 | Left_Shoulder.C0 = CFrame.new(-1.5,0,0) | |
138 | ||
139 | Right_Shoulder = Instance.new("Weld", Torso) | |
140 | Right_Shoulder.Part0 = Torso | |
141 | Right_Shoulder.Part1 = Right_Arm | |
142 | Right_Shoulder.Name = "Right Shoulder" | |
143 | Right_Shoulder.C0 = CFrame.new(1.5,0,0) | |
144 | ||
145 | LeftShoulder.Parent = nil | |
146 | RightShoulder.Parent = nil | |
147 | Humanoid.WalkSpeed = 10 | |
148 | ||
149 | local RootCFrame = CFrame.fromEulerAnglesXYZ(-1.57,0,3.14) | |
150 | Necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
151 | Necko2 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
152 | Right_Hip_C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
153 | Left_Hip_C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
154 | ||
155 | ||
156 | Movemment = 1 | |
157 | Walk = 0 | |
158 | ||
159 | Animator = Humanoid.Animator | |
160 | --Animate = Character.Animate | |
161 | ||
162 | Animator.Parent = nil | |
163 | --Animate.Parent = nil | |
164 | ||
165 | local Services = { | |
166 | ||
167 | SoundService = game:GetService("SoundService"); | |
168 | Players = owner | |
169 | Debris = game:GetService("Debris"); | |
170 | Workspace = game:GetService("Workspace"); | |
171 | Lighting = game:GetService("Lighting"); | |
172 | HttpService = game:GetService("HttpService"); | |
173 | InsertService = game:GetService("InsertService"); | |
174 | ||
175 | } | |
176 | ||
177 | local ManaBarGUI = Instance.new("ScreenGui", Player.PlayerGui) | |
178 | ManaBarGUI.Name = "ManaBarGUI" | |
179 | ||
180 | local ManaBarP1 = Instance.new("Frame", ManaBarGUI) | |
181 | ManaBarP1.Name = "ManaBarPart1" | |
182 | ManaBarP1.Size = UDim2.new(0,300,0,20) | |
183 | ManaBarP1.Position = UDim2.new(0,350,0.1,0) | |
184 | ManaBarP1.BackgroundColor3 = BrickColor.Black().Color | |
185 | ||
186 | local ManaBarP2 = Instance.new("Frame", ManaBarP1) | |
187 | ManaBarP2.Name = "ManaBarPart2" | |
188 | ManaBarP2.Size = UDim2.new(0,300,0,20) | |
189 | ManaBarP2.Position = UDim2.new(0,0,0,0) | |
190 | ManaBarP2.BackgroundColor3 = BrickColor.new("Black").Color | |
191 | ||
192 | local ManaBarText = Instance.new("TextLabel", ManaBarP1) | |
193 | ManaBarText.Name = "ManaBarText" | |
194 | ManaBarText.Size = UDim2.new(0,300,0,20) | |
195 | ManaBarText.Position = UDim2.new(0,0,-1.5,0) | |
196 | ManaBarText.TextScaled = true | |
197 | ManaBarText.Text = "<{[ Destruction ]}> 0 <{[ Destruction ]}>" | |
198 | ManaBarText.BackgroundTransparency = 1 | |
199 | ManaBarText.TextStrokeTransparency = 0 | |
200 | ManaBarText.TextStrokeColor3 = Color3.new(1,1,1) | |
201 | ManaBarText.TextColor3 = Color3.new(0,0,0) | |
202 | ManaBarText.Font = "Garamond" | |
203 | ||
204 | local WorldEaterGui = Instance.new("BillboardGui", Head) | |
205 | WorldEaterGui.ExtentsOffset = Vector3.new(0,5,0) | |
206 | WorldEaterGui.Adornee = Head | |
207 | WorldEaterGui.AlwaysOnTop = true | |
208 | WorldEaterGui.Enabled = true | |
209 | WorldEaterGui.Size = UDim2.new(0, 200,0, 50) | |
210 | ||
211 | local WorldEaterText = Instance.new("TextLabel", WorldEaterGui) | |
212 | WorldEaterText.BackgroundTransparency = 1 | |
213 | WorldEaterText.Font = "Garamond" | |
214 | WorldEaterText.Size = UDim2.new(0, 200,0, 50) | |
215 | WorldEaterText.TextStrokeColor3 = BrickColor.Red().Color | |
216 | WorldEaterText.TextStrokeTransparency = 0 | |
217 | WorldEaterText.TextColor3 = BrickColor.Black().Color | |
218 | WorldEaterText.TextScaled = true | |
219 | WorldEaterText.Text = "World Eater" | |
220 | ||
221 | --------[[ Mesh Ids ]]-------- | |
222 | ||
223 | SpikeMeshId = 1033714 | |
224 | SpikeBallId = 9982590 | |
225 | StarMeshId = 45428961 | |
226 | CrystalMeshId = 9756362 | |
227 | ||
228 | --[[ Essential Functions ]]-- | |
229 | function NoOutlines(Part) | |
230 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
231 | end | |
232 | ||
233 | ||
234 | local CreatePart = function(Parent, Name, Color, Size, Material, Transparency, Shape) | |
235 | ||
236 | local Part = Instance.new("Part", Parent) | |
237 | Part.Name = Name | |
238 | Part.BrickColor = BrickColor.new(Color) | |
239 | Part.Size = Size | |
240 | Part.Material = Material | |
241 | Part.Transparency = Transparency | |
242 | Part.Shape = Shape | |
243 | Part.CanCollide = false | |
244 | NoOutlines(Part) | |
245 | ||
246 | return Part | |
247 | ||
248 | end | |
249 | ||
250 | local CreateMesh = function(Parent, Scale, Shape) | |
251 | ||
252 | ||
253 | local Mesh = Instance.new("BlockMesh", Parent) | |
254 | Mesh.Scale = Scale | |
255 | ||
256 | return Mesh | |
257 | ||
258 | end | |
259 | ||
260 | local CreateWedge = function(Parent, Name, Color, Size, Material, Transparency) | |
261 | ||
262 | local WedgePart = Instance.new("WedgePart", Parent) | |
263 | WedgePart.Name = Name | |
264 | WedgePart.BrickColor = BrickColor.new(Color) | |
265 | WedgePart.Size = Size | |
266 | WedgePart.Material = Material | |
267 | WedgePart.Transparency = Transparency | |
268 | WedgePart.CanCollide = false | |
269 | NoOutlines(WedgePart) | |
270 | ||
271 | return WedgePart | |
272 | ||
273 | end | |
274 | ||
275 | local CreateWeld = function(Parent, Cframe, P1 , P0) | |
276 | ||
277 | local Weld = Instance.new("Weld", Parent) | |
278 | Weld.Part0 = P0 | |
279 | Weld.Part1 = P1 | |
280 | Weld.Name = P0.Name .. "To" .. P1.Name | |
281 | Weld.C0 = Cframe | |
282 | ||
283 | return Weld | |
284 | ||
285 | end | |
286 | ||
287 | local CreateVelocity = function(Parent,Velocity,Force) | |
288 | ||
289 | local BodyVelocity = Instance.new("BodyVelocity", Parent) | |
290 | BodyVelocity.Velocity = Velocity | |
291 | BodyVelocity.MaxForce = Force | |
292 | ||
293 | ||
294 | ||
295 | return BodyVelocity | |
296 | ||
297 | end | |
298 | ||
299 | ||
300 | local CreateCrystal = function(Parent, Name, Color, Size, Material, Transparency, Scale) | |
301 | ||
302 | ||
303 | local Part = Instance.new("Part", Parent) | |
304 | Part.Name = Name | |
305 | Part.BrickColor = BrickColor.new(Color) | |
306 | Part.Size = Size | |
307 | Part.Material = Material | |
308 | Part.Transparency = Transparency | |
309 | Part.CanCollide = false | |
310 | NoOutlines(Part) | |
311 | ||
312 | local Mesh = Instance.new("SpecialMesh", Part) | |
313 | Mesh.MeshId = "http://www.roblox.com/asset?id=" .. CrystalMeshId | |
314 | Mesh.Scale = Scale | |
315 | ||
316 | return Mesh and Part | |
317 | ||
318 | end | |
319 | ||
320 | local MakeSFX = function(Parent, Id, Volume, Pitch, Type) | |
321 | ||
322 | local SFX = Instance.new("Sound", Parent) | |
323 | SFX.SoundId = "http://www.roblox.com/asset?id=" .. Id | |
324 | SFX.Name = "SFX" | |
325 | SFX:Play() | |
326 | SFX.Volume = Volume | |
327 | SFX.Pitch = Pitch | |
328 | SFX.PlayOnRemove = true | |
329 | SFX:Remove() | |
330 | ||
331 | if Type == "Echo" then | |
332 | ||
333 | Instance.new("EchoSoundEffect", SFX) | |
334 | ||
335 | end | |
336 | ||
337 | end | |
338 | ||
339 | local CreateSpike = function(Parent, Name, Color, Size, Material, Transparency, Scale) | |
340 | ||
341 | ||
342 | local Part = Instance.new("Part", Parent) | |
343 | Part.Name = Name | |
344 | Part.BrickColor = BrickColor.new(Color) | |
345 | Part.Size = Size | |
346 | Part.Material = Material | |
347 | Part.Transparency = Transparency | |
348 | Part.CanCollide = false | |
349 | NoOutlines(Part) | |
350 | ||
351 | local Mesh = Instance.new("SpecialMesh", Part) | |
352 | Mesh.MeshId = "http://www.roblox.com/asset?id=" .. SpikeMeshId | |
353 | Mesh.Scale = Scale | |
354 | ||
355 | return Mesh and Part | |
356 | ||
357 | end | |
358 | ||
359 | CircleEffect = function(Position, Parent, DSX, DSY, DSZ, SX, SY, SZ, Time, Brickcolor, Material, Transparency) | |
360 | ||
361 | local Part = Instance.new("Part", Parent) | |
362 | Part.Transparency = Transparency | |
363 | Part.Name = "CircleEffect" | |
364 | Part.Size = Vector3.new() | |
365 | Part.Anchored = true | |
366 | Part.CanCollide = false | |
367 | Part.Position = Position | |
368 | Part.BrickColor = BrickColor.new(Brickcolor) | |
369 | Part.Material = Material | |
370 | NoOutlines(Part) | |
371 | ||
372 | local Mesh = Instance.new("SpecialMesh", Part) | |
373 | Mesh.MeshType = "Sphere" | |
374 | Mesh.Scale = Vector3.new(DSX, DSY, DSZ) | |
375 | ||
376 | Services.Debris:AddItem(Part, Time) | |
377 | ||
378 | ||
379 | table.insert(Effects, {Part, "Circle", Time, SX, SY, SZ}) | |
380 | ||
381 | ||
382 | end | |
383 | ||
384 | BlockEffect = function(Position, Parent, DSX, DSY, DSZ, SX, SY, SZ, Time, Brickcolor, Material, Transparency) | |
385 | ||
386 | local Part = Instance.new("Part", Parent) | |
387 | Part.Transparency = Transparency | |
388 | Part.Name = "BlockEffect" | |
389 | Part.Size = Vector3.new() | |
390 | Part.Anchored = true | |
391 | Part.Position = Position | |
392 | Part.CanCollide = false | |
393 | Part.BrickColor = BrickColor.new(Brickcolor) | |
394 | Part.Material = Material | |
395 | NoOutlines(Part) | |
396 | ||
397 | local Mesh = Instance.new("BlockMesh", Part) | |
398 | Mesh.Scale = Vector3.new(DSX, DSY, DSZ) | |
399 | ||
400 | Services.Debris:AddItem(Part, Time) | |
401 | ||
402 | table.insert(Effects, {Part, "Block", Time, SX, SY, SZ}) | |
403 | ||
404 | ||
405 | end | |
406 | ||
407 | --[[ Damage function ]]-- | |
408 | ||
409 | ||
410 | function DamageFunction(Hit, Part, Type, HitSFX, Knockback, Min, Max) | |
411 | ||
412 | local HitHumanoid = Hit.Parent.Humanoid | |
413 | ||
414 | ||
415 | local Damage = math.random(Min, Max) | |
416 | ||
417 | ||
418 | coroutine.resume(coroutine.create(function() | |
419 | HitHumanoid:TakeDamage(Damage) | |
420 | end)) | |
421 | ||
422 | if Type == "Shrink" then | |
423 | MakeSFX(Hit.Parent.Torso, 209527235, 1, 1) | |
424 | for i,v in pairs(Hit.Parent:children()) do | |
425 | if v:IsA("Part") then | |
426 | coroutine.resume(coroutine.create(function() | |
427 | for i = 1,100 do | |
428 | wait() | |
429 | v.Size = v.Size - Vector3.new(0.05,0.05,0.05) | |
430 | v.Transparency = v.Transparency + 0.05 | |
431 | ||
432 | end | |
433 | end)) | |
434 | end | |
435 | end | |
436 | ||
437 | end | |
438 | ||
439 | ||
440 | ||
441 | if Type == "Normal" then | |
442 | ||
443 | local Push = CreateVelocity(Hit.Parent.Torso, Torso.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
444 | Services.Debris:AddItem(Push, 0) | |
445 | DamageLabel(Hit.Parent, Damage, Hit) | |
446 | ||
447 | elseif Type == "Ranged" then | |
448 | local Push = CreateVelocity(Hit.Parent.Torso, Part.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
449 | Services.Debris:AddItem(Push, 0) | |
450 | DamageLabel(Hit.Parent, Damage, Hit) | |
451 | ||
452 | elseif Type == "Impale" then | |
453 | ||
454 | local Spike = CreateSpike(Services.Workspace, "D e a t h", "Black", Vector3.new(), "SmoothPlastic", 0, Vector3.new(1,20,1)) | |
455 | Spike.Anchored = true | |
456 | Spike.Rotation = Vector3.new(math.random(-50,50), 0 , math.random(-50,50)) | |
457 | Spike.Position = Hit.Parent.Torso.Position | |
458 | ||
459 | ||
460 | Services.Debris:AddItem(Spike, 30) | |
461 | ||
462 | Hit.Parent:BreakJoints() | |
463 | Hit.Parent.Torso.Position = Spike.Position + Vector3.new(0,5,0) | |
464 | Hit.Parent.Torso.Anchored = true | |
465 | ||
466 | MakeSFX(Spike, 306247724, 1,1) | |
467 | MakeSFX(Hit.Parent.Torso, 209527175, 10,1) | |
468 | elseif Type == "Knockdown" then | |
469 | ||
470 | ||
471 | local Push = CreateVelocity(Hit.Parent.Torso, Part.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
472 | DamageLabel(Hit.Parent, Damage, Hit) | |
473 | Services.Debris:AddItem(Push, 0.3) | |
474 | ||
475 | coroutine.resume(coroutine.create(function() | |
476 | ||
477 | HitHumanoid.PlatformStand = true | |
478 | wait(1) | |
479 | HitHumanoid.PlatformStand = false | |
480 | ||
481 | ||
482 | end)) | |
483 | end | |
484 | ||
485 | if HitSFX == "Penetration" then | |
486 | ||
487 | MakeSFX(Hit, 199149269, 1 , 1) | |
488 | ||
489 | elseif HitSFX == "Punch" then | |
490 | ||
491 | MakeSFX(Hit, 278062209, 1 , 1) | |
492 | ||
493 | ||
494 | ||
495 | ||
496 | end | |
497 | end | |
498 | ||
499 | function DamageLabel(HitCharacter, DamageDealt, Hit) | |
500 | ||
501 | local DamageShowingPart = CreatePart(Services.Workspace, "ShowDamage", "Bright yellow", Vector3.new(0.8,0.8,0.8), "Neon", 1, "Block") | |
502 | DamageShowingPart.Position = HitCharacter.Head.Position | |
503 | ||
504 | local DamageGui = Instance.new("BillboardGui", DamageShowingPart) | |
505 | DamageGui.Name = "Damage" | |
506 | DamageGui.AlwaysOnTop = true | |
507 | DamageGui.Size = UDim2.new(5, 0, 5, 0) | |
508 | ||
509 | local DamageNumber = Instance.new("TextLabel", DamageGui) | |
510 | DamageNumber.Size = UDim2.new(1,0,1,0) | |
511 | if Hit.Parent:FindFirstChild("Head") then | |
512 | DamageNumber.TextStrokeColor3 = Hit.Parent.Head.BrickColor.Color | |
513 | DamageNumber.TextColor3 = Hit.BrickColor.Color | |
514 | end | |
515 | DamageNumber.TextStrokeTransparency = 0 | |
516 | DamageNumber.BackgroundTransparency = 1 | |
517 | DamageNumber.Font = "SourceSansBold" | |
518 | DamageNumber.TextScaled = true | |
519 | DamageNumber.Text = DamageDealt | |
520 | ||
521 | local BodyVelocity = Instance.new("BodyVelocity", DamageShowingPart) | |
522 | BodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
523 | BodyVelocity.Velocity = Vector3.new(0,2,0) | |
524 | ||
525 | Services.Debris:AddItem(DamageShowingPart, 3) | |
526 | ||
527 | ||
528 | end | |
529 | ||
530 | function ValidateDamage(Part, Distance ,Min , Max, Type, HitSFX, Knockback) | |
531 | for _,WorkspaceChildren in pairs(workspace:children()) do | |
532 | ||
533 | local HitHumanoid = WorkspaceChildren:findFirstChild("Humanoid") | |
534 | ||
535 | if HitHumanoid ~= nil then | |
536 | local Hit = WorkspaceChildren:findFirstChild("Torso") | |
537 | ||
538 | if Hit ~= nil then | |
539 | ||
540 | local Target = Hit.Position - Part.Position | |
541 | ||
542 | local Magnitude = Target.magnitude | |
543 | ||
544 | if Magnitude <= Distance and WorkspaceChildren.Name ~= Player.Name then | |
545 | ||
546 | local HitBlock = Hit.Parent:FindFirstChild("Block") | |
547 | ||
548 | if HitBlock ~= nil and HitBlock:FindFirstChild("BlockDurability") and HitBlock.Value == true then | |
549 | ||
550 | local HitBlock2 = Hit.Parent.Block.BlockDurability | |
551 | ||
552 | if HitBlock2.Value > 15 then | |
553 | ||
554 | local HitN = math.random(1,5) | |
555 | ||
556 | HitBlock2.Value = HitBlock2.Value - 15 | |
557 | ||
558 | ||
559 | if HitN == 1 then | |
560 | MakeSFX(Hit ,199148971, 0.5, 1) | |
561 | end | |
562 | ||
563 | if HitN == 2 then | |
564 | MakeSFX(Hit ,199149025, 0.5, 1) | |
565 | end | |
566 | ||
567 | if HitN == 3 then | |
568 | MakeSFX(Hit ,199149072, 0.5, 1) | |
569 | end | |
570 | ||
571 | if HitN == 4 then | |
572 | MakeSFX(Hit ,199149109, 0.5, 1) | |
573 | end | |
574 | ||
575 | if HitN == 5 then | |
576 | MakeSFX(Hit ,199149119, 0.5, 1) | |
577 | end | |
578 | return | |
579 | end | |
580 | end | |
581 | ||
582 | DamageFunction(Hit, Part, Type, HitSFX, Knockback, Min, Max) | |
583 | ||
584 | ||
585 | ||
586 | end | |
587 | end | |
588 | end | |
589 | end | |
590 | end | |
591 | ||
592 | ||
593 | ||
594 | local Cloak = Instance.new("Part", Character) | |
595 | Cloak.Name = "Cloak" | |
596 | Cloak.CanCollide = false | |
597 | Cloak.BrickColor = BrickColor.new("Institutional white") | |
598 | ||
599 | local CloakMesh = Instance.new("SpecialMesh", Cloak) | |
600 | CloakMesh.MeshId = "http://www.roblox.com/asset?id=16150814" | |
601 | CloakMesh.TextureId = "http://www.roblox.com/asset?id=16150799" | |
602 | ||
603 | local CloakWeld = CreateWeld(Cloak, CFrame.new(0,0,0) * CFrame.Angles(0,0,0), Head , Cloak, "ArkusToCharacter") | |
604 | ||
605 | for i,v in pairs(Character:children()) do | |
606 | if v:IsA("Accessory") then | |
607 | v:Remove() | |
608 | elseif v:IsA("Shirt") then | |
609 | v:Remove() | |
610 | elseif v:IsA("Pants") then | |
611 | v:Remove() | |
612 | elseif v:IsA("BodyColors") then | |
613 | ||
614 | Head.BrickColor =BrickColor.new("Really black") | |
615 | Torso.BrickColor = BrickColor.new("Really black") | |
616 | Right_Arm.BrickColor = BrickColor.new("Really black") | |
617 | Right_Leg.BrickColor = BrickColor.new("Really black") | |
618 | Left_Arm.BrickColor = BrickColor.new("Really black") | |
619 | Left_Leg.BrickColor = BrickColor.new("Really black") | |
620 | ||
621 | v.HeadColor = BrickColor.new("Really black") | |
622 | v.TorsoColor = BrickColor.new("Really black") | |
623 | v.RightArmColor = BrickColor.new("Really black") | |
624 | v.LeftArmColor = BrickColor.new("Really black") | |
625 | v.RightLegColor = BrickColor.new("Really black") | |
626 | v.LeftLegColor = BrickColor.new("Really black") | |
627 | ||
628 | end | |
629 | end | |
630 | ||
631 | ||
632 | ||
633 | --[[ CLerp Declarations ]]-- | |
634 | ||
635 | function clerp(a,b,t) | |
636 | local qa = {QuaternionFromCFrame(a)} | |
637 | local qb = {QuaternionFromCFrame(b)} | |
638 | local ax, ay, az = a.x, a.y, a.z | |
639 | local bx, by, bz = b.x, b.y, b.z | |
640 | local _t = 1-t | |
641 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
642 | end | |
643 | ||
644 | function QuaternionFromCFrame(cf) -- dis one | |
645 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
646 | local trace = m00 + m11 + m22 | |
647 | if trace > 0 then | |
648 | local s = math.sqrt(1 + trace) | |
649 | local recip = 0.5/s | |
650 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
651 | else | |
652 | local i = 0 | |
653 | if m11 > m00 then | |
654 | i = 1 | |
655 | end | |
656 | if m22 > (i == 0 and m00 or m11) then | |
657 | i = 2 | |
658 | end | |
659 | if i == 0 then | |
660 | local s = math.sqrt(m00-m11-m22+1) | |
661 | local recip = 0.5/s | |
662 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
663 | elseif i == 1 then | |
664 | local s = math.sqrt(m11-m22-m00+1) | |
665 | local recip = 0.5/s | |
666 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
667 | elseif i == 2 then | |
668 | local s = math.sqrt(m22-m00-m11+1) | |
669 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
670 | end | |
671 | end | |
672 | end | |
673 | ||
674 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
675 | local xs, ys, zs = x + x, y + y, z + z | |
676 | local wx, wy, wz = w*xs, w*ys, w*zs | |
677 | local xx = x*xs | |
678 | local xy = x*ys | |
679 | local xz = x*zs | |
680 | local yy = y*ys | |
681 | local yz = y*zs | |
682 | local zz = z*zs | |
683 | 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)) | |
684 | end | |
685 | ||
686 | function QuaternionSlerp(a, b, t) | |
687 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
688 | local startInterp, finishInterp; | |
689 | if cosTheta >= 0.0001 then | |
690 | if (1 - cosTheta) > 0.0001 then | |
691 | local theta = math.acos(cosTheta) | |
692 | local invSinTheta = 1/math.sin(theta) | |
693 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
694 | finishInterp = math.sin(t*theta)*invSinTheta | |
695 | else | |
696 | startInterp = 1-t | |
697 | finishInterp = t | |
698 | end | |
699 | else | |
700 | if (1+cosTheta) > 0.0001 then | |
701 | local theta = math.acos(-cosTheta) | |
702 | local invSinTheta = 1/math.sin(theta) | |
703 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
704 | finishInterp = math.sin(t*theta)*invSinTheta | |
705 | else | |
706 | startInterp = t-1 | |
707 | finishInterp = t | |
708 | end | |
709 | end | |
710 | 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 | |
711 | end | |
712 | ||
713 | function RayCast(Pos, Dir, Max, Ignore) | |
714 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
715 | end | |
716 | ||
717 | ||
718 | function Bars() | |
719 | ||
720 | --[[ Mana Bar ]]-- | |
721 | if Destruction ~= MaxDestruction then | |
722 | ||
723 | Destruction = Destruction + 1 | |
724 | ||
725 | end | |
726 | ||
727 | if Destruction >= MaxDestruction then | |
728 | ||
729 | Destruction = Destruction | |
730 | ||
731 | end | |
732 | ||
733 | ||
734 | ManaBarText.Text = "<{[ Destruction ]}> <|"..Destruction.."|> <{[ Destruction ]}>" | |
735 | ||
736 | ManaBarP2.Size = UDim2.new(Destruction / Destruction,0,0,20) | |
737 | ||
738 | end | |
739 | local EyeReference = CreatePart(Character, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
740 | local EyeReferenceWeld = CreateWeld(EyeReference, CFrame.new(0.15,-0.1,-0.7), EyeReference, Head) | |
741 | ||
742 | coroutine.resume(coroutine.create(function() | |
743 | ||
744 | while wait(3) do | |
745 | ||
746 | ||
747 | CircleEffect(EyeReference.Position, Services.Workspace, 1, 1, 1, 1, 1, 1, 0.5, "Bright red", "Neon", 0.5) | |
748 | ||
749 | ||
750 | end | |
751 | ||
752 | end)) | |
753 | --[[ Attacks ]]-- | |
754 | ||
755 | function Attack1() | |
756 | Attacking = true | |
757 | MakeSFX(EyeReference, 341336274, 1,1) | |
758 | wait(0.3) | |
759 | local Reference = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
760 | local ReferenceWeld = CreateWeld(Reference, CFrame.new(0,0.5,-5), Reference, Root) | |
761 | ||
762 | local Reference2 = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
763 | local Reference2Weld = CreateWeld(Reference2, CFrame.new(0,0.5,-2), Reference2, Root) | |
764 | ||
765 | ||
766 | for i = 1,10 do | |
767 | ||
768 | wait() | |
769 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,-1.6),0.5) | |
770 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,0,1.3),0.2) | |
771 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.1, 0) * CFrame.Angles(0,0,0.2), 0.3) | |
772 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0,0,-1.6), 0.4) | |
773 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0) * CFrame.Angles(0,1.6,0),0.3) | |
774 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0) * CFrame.Angles(0,-1.6,0),0.3) | |
775 | ||
776 | end | |
777 | ||
778 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5) | |
779 | wait(0.5) | |
780 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5) | |
781 | wait(0.5) | |
782 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5) | |
783 | wait(0.5) | |
784 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5) | |
785 | wait(0.5) | |
786 | MakeSFX(Reference, 306247724, 1,1) | |
787 | CircleEffect(Reference.Position, Services.Workspace, 1, 1, 1, 5, 5, 5, 5, "Bright red", "Neon", 0.5) | |
788 | ValidateDamage(Reference, 10 ,10 , 14, "Shrink", "Penetration", 5) | |
789 | Attacking = false | |
790 | end | |
791 | ||
792 | function Attack2() | |
793 | ||
794 | Attacking = true | |
795 | Humanoid.WalkSpeed = 0 | |
796 | Humanoid.JumpPower = 0 | |
797 | ||
798 | ||
799 | for i = 1,25 do | |
800 | wait() | |
801 | ||
802 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(-0.5,0,0),0.2) | |
803 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(-0.5,0,0),0.3) | |
804 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1, 1, 0) * CFrame.Angles(3.2,0,-0.6), 0.3) | |
805 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1, 1, 0) * CFrame.Angles(3.2,0,0.6), 0.3) | |
806 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,-0.3),0.2) | |
807 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,-0.5)*CFrame.Angles(0,-1.6,0),0.2) | |
808 | ||
809 | end | |
810 | ||
811 | MakeSFX(Torso, 142070127, 1, 1) | |
812 | ValidateDamage(Torso, 60 ,23, 26, "Knockdown", "Penetration", 15) | |
813 | local Hit, Position = RayCast(Torso.Position,(CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector,100,Character) | |
814 | if Hit ~= nil then | |
815 | local Reference = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
816 | Reference.Anchored = true | |
817 | Reference.CFrame = CFrame.new(Position) | |
818 | ||
819 | CircleEffect(Reference.Position, Services.Workspace, 1, 1, 1, 5, 5, 5, 5, "Bright red", "Neon", 0.5) | |
820 | ||
821 | game:GetService("Debris"):AddItem(Reference,0.1) | |
822 | for i=1,50 do | |
823 | ||
824 | local Ground = CreatePart(Services.Workspace, "Ground", Hit.BrickColor.Color, Vector3.new(math.random(1,3), math.random(1,3), math.random(1,3)), Hit.Material, 0, "Block") | |
825 | Ground.Anchored = true | |
826 | Ground.CanCollide = true | |
827 | Ground.CFrame = CFrame.new(Position) * CFrame.new(math.random(-30,30), 0, math.random(-30,30)) * CFrame.Angles(math.random(-50,50),math.random(-50,50), math.random(-50,50)) | |
828 | ||
829 | game:GetService("Debris"):AddItem(Ground,10) | |
830 | ||
831 | end | |
832 | end | |
833 | ||
834 | for i = 1,25 do | |
835 | wait() | |
836 | ||
837 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.5) | |
838 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.5,0,0),0.3) | |
839 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, 0.1) * CFrame.Angles(-0.2,0,0), 0.3) | |
840 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, 0.1) * CFrame.Angles(-0.2,0,0), 0.3) | |
841 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,-0.3),0.2) | |
842 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,-0.5)*CFrame.Angles(0,-1.6,0),0.2) | |
843 | ||
844 | end | |
845 | ||
846 | Attacking = false | |
847 | Humanoid.WalkSpeed = 16 | |
848 | Humanoid.JumpPower = 50 | |
849 | ||
850 | ||
851 | ||
852 | end | |
853 | ||
854 | ||
855 | function Attack3() | |
856 | Humanoid.WalkSpeed = 0 | |
857 | Humanoid.JumpPower = 0 | |
858 | Attacking = true | |
859 | wait(1) | |
860 | MakeSFX(Torso, 341336274, 1, 1.2) | |
861 | CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Black", "Neon", 0.5) | |
862 | wait(1) | |
863 | MakeSFX(Torso, 341336274, 1, 1.2) | |
864 | CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Black", "Neon", 0.5) | |
865 | wait(1) | |
866 | MakeSFX(Torso, 341336274, 1, 1.2) | |
867 | CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Black", "Neon", 0.5) | |
868 | ValidateDamage(Torso, 60 ,0, 0, "Impale", "Penetration", 15) | |
869 | Humanoid.WalkSpeed = 16 | |
870 | Humanoid.JumpPower = 50 | |
871 | Attacking = false | |
872 | end | |
873 | ||
874 | Mouse.Button1Down:connect(function() | |
875 | if not Attacking then | |
876 | if Combo == 1 then | |
877 | ||
878 | Combo = 2 | |
879 | Attack1() | |
880 | ||
881 | ||
882 | elseif Combo == 2 then | |
883 | ||
884 | Attack2() | |
885 | Combo = 3 | |
886 | ||
887 | elseif Combo == 3 then | |
888 | ||
889 | Attack3() | |
890 | Combo = 1 | |
891 | ||
892 | end | |
893 | end | |
894 | end) | |
895 | ||
896 | --[[ CLerp Animations ]]-- | |
897 | Change1 = 0 | |
898 | Change2 = 0 | |
899 | Change3 = 0 | |
900 | Change4 = 0 | |
901 | ||
902 | while true do | |
903 | wait() | |
904 | ||
905 | local Torvel = (Root.Velocity*Vector3.new(1,0,1)).magnitude | |
906 | local Velderp = Root.Velocity.y | |
907 | HitFloor,PosFloor = RayCast(Root.Position,(CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
908 | ||
909 | Bars() | |
910 | ||
911 | ||
912 | if Torvel < 1 and HitFloor ~= nil and Attacking == false then | |
913 | Anim = "Idle" | |
914 | ||
915 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
916 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,-0.3,0),0.3) | |
917 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.1, 0) * CFrame.Angles(0,0,0.2), 0.3) | |
918 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.1, 0) * CFrame.Angles(0,0,-0.2), 0.3) | |
919 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0) * CFrame.Angles(-0.1,0,0),0.2) | |
920 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0) * CFrame.Angles(-0.1,0,0),0.2) | |
921 | ||
922 | end | |
923 | ||
924 | ||
925 | if 2 < Torvel and Torvel < 22 and HitFloor ~= nil and Attacking == false then | |
926 | Anim = "Walking" | |
927 | ||
928 | if Invert == false then | |
929 | Change1 = Change1 + 0.1 | |
930 | ||
931 | elseif Invert == true then | |
932 | ||
933 | Change1 = Change1 - 0.1 | |
934 | ||
935 | end | |
936 | ||
937 | if Change1 > 0.5 then | |
938 | ||
939 | Invert = true | |
940 | ||
941 | elseif Change1 < -0.5 then | |
942 | ||
943 | Invert = false | |
944 | ||
945 | end | |
946 | ||
947 | if Attacking == false then | |
948 | ||
949 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
950 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,-0.3,0),0.3) | |
951 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, -Change1) * CFrame.Angles(Change1,0,0), 0.3) | |
952 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, Change1) * CFrame.Angles(-Change1,0,0), 0.3) | |
953 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-Change1 / 4)*CFrame.Angles(Change1,1.6,0),0.2) | |
954 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,Change1 / 4)*CFrame.Angles(-Change1,-1.6,0),0.2) | |
955 | ||
956 | end | |
957 | end | |
958 | ||
959 | if Root.Velocity.y > 1 and HitFloor == nil and Attacking == false then | |
960 | Anim = "Jump" | |
961 | ||
962 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
963 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(-0.5,0,0),0.3) | |
964 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, 0.2) * CFrame.Angles(-0.4,0,0.2), 0.3) | |
965 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, 0.2) * CFrame.Angles(-0.4,0,-0.2), 0.3) | |
966 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-0.2)*CFrame.Angles(-0.2,1.6,0),0.2) | |
967 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
968 | ||
969 | end | |
970 | ||
971 | if Root.Velocity.y < -1 and HitFloor == nil and Attacking == false then | |
972 | Anim = "Fall" | |
973 | ||
974 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
975 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.5,0,0),0.3) | |
976 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, -0.2) * CFrame.Angles(0.4,0,0.2), 0.3) | |
977 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, -0.2) * CFrame.Angles(0.4,0,-0.2), 0.3) | |
978 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-0.2)*CFrame.Angles(-0.2,1.6,0),0.2) | |
979 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
980 | ||
981 | end | |
982 | ||
983 | ||
984 | if #Effects > 0 then | |
985 | for E = 1, #Effects do | |
986 | if Effects[E]~=nil then | |
987 | local Effect = Effects[E] | |
988 | ||
989 | if Effect ~= nil then | |
990 | ||
991 | local Part = Effect[1] | |
992 | local Mode = Effect[2] | |
993 | local Time = Effect[3] | |
994 | local SizeX = Effect[4] | |
995 | local SizeY = Effect[5] | |
996 | local SizeZ = Effect[6] | |
997 | ||
998 | if Effect[1].Transparency <= 1 then | |
999 | if Effect[2] == "Block" then | |
1000 | Effect[1].CFrame = Effect[1].CFrame * CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1001 | ||
1002 | Mesh = Effect[1]:FindFirstChild("Mesh") | |
1003 | if Mesh ~= nil then | |
1004 | Mesh.Scale = Mesh.Scale + Vector3.new(Effect[4],Effect[5],Effect[6]) | |
1005 | end | |
1006 | ||
1007 | elseif Effect[2] == "Circle" then | |
1008 | ||
1009 | if Effect[1]:FindFirstChild("Mesh") ~= nil then | |
1010 | Mesh=Effect[1].Mesh | |
1011 | Mesh.Scale = Mesh.Scale + Vector3.new(Effect[4],Effect[5],Effect[6]) | |
1012 | end | |
1013 | ||
1014 | Effect[1].Transparency = Effect[1].Transparency + 0.05 | |
1015 | ||
1016 | else | |
1017 | ||
1018 | Part.Parent=nil | |
1019 | ||
1020 | table.remove(Effects, E) | |
1021 | ||
1022 | end | |
1023 | end | |
1024 | end | |
1025 | end | |
1026 | end | |
1027 | end | |
1028 | end |