SHOW:
|
|
- or go back to the newest paste.
1 | --https://github.com/Mokiros/roblox-FE-compatibility | |
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | do | |
6 | print("FE Compatibility code V2 by Mokiros") | |
7 | local RealPlayer = RealPlayer | |
8 | script.Parent = RealPlayer.Character | |
9 | ||
10 | --Fake event to make stuff like Mouse.KeyDown work | |
11 | local Disconnect_Function = function(this) | |
12 | this[1].Functions[this[2]] = nil | |
13 | end | |
14 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}} | |
15 | local FakeEvent_Metatable = {__index={ | |
16 | Connect = function(this,f) | |
17 | local i = tostring(math.random(0,10000)) | |
18 | while this.Functions[i] do | |
19 | i = tostring(math.random(0,10000)) | |
20 | end | |
21 | this.Functions[i] = f | |
22 | return setmetatable({this,i},Disconnect_Metatable) | |
23 | end | |
24 | }} | |
25 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
26 | local function fakeEvent() | |
27 | return setmetatable({Functions={}},FakeEvent_Metatable) | |
28 | end | |
29 | ||
30 | --Creating fake input objects with fake variables | |
31 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
32 | FakeMouse.keyUp = FakeMouse.KeyUp | |
33 | FakeMouse.keyDown = FakeMouse.KeyDown | |
34 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
35 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
36 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
37 | end} | |
38 | --Merged 2 functions into one by checking amount of arguments | |
39 | CAS.UnbindAction = CAS.BindAction | |
40 | ||
41 | --This function will trigger the events that have been :Connect()'ed | |
42 | local function TriggerEvent(self,ev,...) | |
43 | for _,f in pairs(self[ev].Functions) do | |
44 | f(...) | |
45 | end | |
46 | end | |
47 | FakeMouse.TriggerEvent = TriggerEvent | |
48 | UIS.TriggerEvent = TriggerEvent | |
49 | ||
50 | --Client communication | |
51 | local Event = Instance.new("RemoteEvent") | |
52 | Event.Name = "UserInput_Event" | |
53 | Event.OnServerEvent:Connect(function(plr,io) | |
54 | if plr~=RealPlayer then return end | |
55 | FakeMouse.Target = io.Target | |
56 | FakeMouse.Hit = io.Hit | |
57 | if not io.isMouse then | |
58 | local b = io.UserInputState == Enum.UserInputState.Begin | |
59 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
60 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
61 | end | |
62 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
63 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
64 | end | |
65 | for _,t in pairs(CAS.Actions) do | |
66 | for _,k in pairs(t.Keys) do | |
67 | if k==io.KeyCode then | |
68 | t.Function(t.Name,io.UserInputState,io) | |
69 | end | |
70 | end | |
71 | end | |
72 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
73 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
74 | end | |
75 | end) | |
76 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event") | |
77 | local Mouse = owner:GetMouse() | |
78 | local UIS = game:GetService("UserInputService") | |
79 | local input = function(io,RobloxHandled) | |
80 | if RobloxHandled then return end | |
81 | --Since InputObject is a client-side instance, we create and pass table instead | |
82 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
83 | end | |
84 | UIS.InputBegan:Connect(input) | |
85 | UIS.InputEnded:Connect(input) | |
86 | ||
87 | local h,t | |
88 | --Give the server mouse data every second frame, but only if the values changed | |
89 | --If player is not moving their mouse, client won't fire events | |
90 | local HB = game:GetService("RunService").Heartbeat | |
91 | while true do | |
92 | if h~=Mouse.Hit or t~=Mouse.Target then | |
93 | h,t=Mouse.Hit,Mouse.Target | |
94 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
95 | end | |
96 | --Wait 2 frames | |
97 | for i=1,2 do | |
98 | HB:Wait() | |
99 | end | |
100 | end]==],script) | |
101 | ||
102 | ----Sandboxed game object that allows the usage of client-side methods and services | |
103 | --Real game object | |
104 | local RealGame = game | |
105 | ||
106 | --Metatable for fake service | |
107 | local FakeService_Metatable = { | |
108 | __index = function(self,k) | |
109 | local s = rawget(self,"_RealService") | |
110 | if s then | |
111 | return typeof(s[k])=="function" | |
112 | and function(_,...)return s[k](s,...)end or s[k] | |
113 | end | |
114 | end, | |
115 | __newindex = function(self,k,v) | |
116 | local s = rawget(self,"_RealService") | |
117 | if s then s[k]=v end | |
118 | end | |
119 | } | |
120 | local function FakeService(t,RealService) | |
121 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
122 | return setmetatable(t,FakeService_Metatable) | |
123 | end | |
124 | ||
125 | --Fake game object | |
126 | local FakeGame = { | |
127 | GetService = function(self,s) | |
128 | return rawget(self,s) or RealGame:GetService(s) | |
129 | end, | |
130 | Players = FakeService({ | |
131 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player) | |
132 | },"Players"), | |
133 | UserInputService = FakeService(UIS,"UserInputService"), | |
134 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
135 | RunService = FakeService({ | |
136 | _btrs = {}, | |
137 | RenderStepped = RealGame:GetService("RunService").Heartbeat, | |
138 | BindToRenderStep = function(self,name,_,fun) | |
139 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
140 | end, | |
141 | UnbindFromRenderStep = function(self,name) | |
142 | self._btrs[name]:Disconnect() | |
143 | end, | |
144 | },"RunService") | |
145 | } | |
146 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
147 | FakeGame.service = FakeGame.GetService | |
148 | FakeService(FakeGame,game) | |
149 | --Changing owner to fake player object to support owner:GetMouse() | |
150 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
151 | end | |
152 | Player=game:GetService("Players").LocalPlayer | |
153 | Character=Player.Character | |
154 | PlayerGui=Player.PlayerGui | |
155 | Backpack=Player.Backpack | |
156 | Torso=Character.Torso | |
157 | Head=Character.Head | |
158 | Humanoid=Character.Humanoid | |
159 | LeftArm=Character["Left Arm"] | |
160 | LeftLeg=Character["Left Leg"] | |
161 | RightArm=Character["Right Arm"] | |
162 | RightLeg=Character["Right Leg"] | |
163 | cam=game.Workspace.CurrentCamera | |
164 | LS=Torso["Left Shoulder"] | |
165 | LH=Torso["Left Hip"] | |
166 | RS=Torso["Right Shoulder"] | |
167 | RH=Torso["Right Hip"] | |
168 | Face = Head.face | |
169 | Neck=Torso.Neck | |
170 | it=Instance.new | |
171 | attacktype=1 | |
172 | vt=Vector3.new | |
173 | cf=CFrame.new | |
174 | euler=CFrame.fromEulerAnglesXYZ | |
175 | angles=CFrame.Angles | |
176 | cloaked=false | |
177 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
178 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
179 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
180 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
181 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
182 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
183 | RootPart=Character.HumanoidRootPart | |
184 | RootJoint=RootPart.RootJoint | |
185 | RootCF=euler(-1.57,0,3.14) | |
186 | attack = false | |
187 | bounce=false | |
188 | cooldown=false | |
189 | deeznuts=false | |
190 | attackdebounce = false | |
191 | deb=false | |
192 | equipped=true | |
193 | hand=false | |
194 | MMouse=nil | |
195 | combo=0 | |
196 | mana=0 | |
197 | trispeed=.2 | |
198 | attackmode='none' | |
199 | local idle=0 | |
200 | local Anim="Idle" | |
201 | local Effects={} | |
202 | local gun=false | |
203 | local shoot=false | |
204 | player=nil | |
205 | mana=0 | |
206 | cam = workspace.CurrentCamera | |
207 | ZTarget = nil | |
208 | RocketTarget = nil | |
209 | local m = Instance.new("Model",Character) | |
210 | m.Name = "WeaponModel" | |
211 | ||
212 | mouse=Player:GetMouse() | |
213 | --save shoulders | |
214 | RSH, LSH=nil, nil | |
215 | --welds | |
216 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
217 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
218 | LH=Torso["Left Hip"] | |
219 | RH=Torso["Right Hip"] | |
220 | TorsoColor=Torso.BrickColor | |
221 | function NoOutline(Part) | |
222 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
223 | end | |
224 | player=Player | |
225 | ch=Character | |
226 | RSH=ch.Torso["Right Shoulder"] | |
227 | LSH=ch.Torso["Left Shoulder"] | |
228 | -- | |
229 | RSH.Parent=nil | |
230 | LSH.Parent=nil | |
231 | -- | |
232 | RW.Name="Right Shoulder" | |
233 | RW.Part0=ch.Torso | |
234 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
235 | RW.C1=cf(0, 0.5, 0) | |
236 | RW.Part1=ch["Right Arm"] | |
237 | RW.Parent=ch.Torso | |
238 | -- | |
239 | LW.Name="Left Shoulder" | |
240 | LW.Part0=ch.Torso | |
241 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
242 | LW.C1=cf(0, 0.5, 0) | |
243 | LW.Part1=ch["Left Arm"] | |
244 | LW.Parent=ch.Torso | |
245 | ||
246 | function swait(num) | |
247 | if num==0 or num==nil then | |
248 | game:service'RunService'.Heartbeat:wait(0) | |
249 | else | |
250 | for i=0,num do | |
251 | game:service'RunService'.Heartbeat:wait(0) | |
252 | end | |
253 | end | |
254 | end | |
255 | ||
256 | function nooutline(part) | |
257 | part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10 | |
258 | end | |
259 | ||
260 | function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size) | |
261 | local fp=it("Part") | |
262 | fp.formFactor=formfactor | |
263 | fp.Parent=parent | |
264 | fp.Reflectance=reflectance | |
265 | fp.Transparency=transparency | |
266 | fp.CanCollide=false | |
267 | fp.Locked=true | |
268 | fp.BrickColor=BrickColor.new(tostring(brickcolor)) | |
269 | fp.Name=name | |
270 | fp.Size=size | |
271 | fp.Position=Character.Torso.Position | |
272 | nooutline(fp) | |
273 | fp.Material=material | |
274 | fp:BreakJoints() | |
275 | return fp | |
276 | end | |
277 | ||
278 | function ppart(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
279 | local fp = it("Part") | |
280 | fp.formFactor = formfactor | |
281 | fp.Parent = parent | |
282 | fp.Reflectance = reflectance | |
283 | fp.Transparency = transparency | |
284 | fp.CanCollide = false | |
285 | fp.Locked=true | |
286 | fp.BrickColor = brickcolor | |
287 | fp.Name = name | |
288 | fp.Size = size | |
289 | fp.Position = EffectPart.Position | |
290 | NoOutline(fp) | |
291 | fp.Material="Neon" | |
292 | fp:BreakJoints() | |
293 | return fp | |
294 | end | |
295 | ||
296 | function wweld(parent,part0,part1,c0) | |
297 | local weld=it("Weld") | |
298 | weld.Parent=parent | |
299 | weld.Part0=part0 | |
300 | weld.Part1=part1 | |
301 | weld.C0=c0 | |
302 | return weld | |
303 | end | |
304 | ||
305 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
306 | local mesh=it(Mesh) | |
307 | mesh.Parent=part | |
308 | if Mesh=="SpecialMesh" then | |
309 | mesh.MeshType=meshtype | |
310 | mesh.MeshId=meshid | |
311 | end | |
312 | mesh.Offset=offset | |
313 | mesh.Scale=scale | |
314 | return mesh | |
315 | end | |
316 | ||
317 | function decal(part,face,texture,transparency,shiny,specular,name) | |
318 | local d=it("Decal",part) | |
319 | d.Shiny=shiny | |
320 | d.Face=face | |
321 | d.Specular=specular | |
322 | d.Transparency=transparency | |
323 | d.Texture=texture | |
324 | d.Name=name | |
325 | return d | |
326 | end | |
327 | ||
328 | function weld(parent,part0,part1,c0,c1) | |
329 | local weld=it("Weld") | |
330 | weld.Parent=parent | |
331 | weld.Part0=part0 | |
332 | weld.Part1=part1 | |
333 | weld.C0=c0 | |
334 | weld.C1=c1 | |
335 | return weld | |
336 | end | |
337 | ||
338 | ||
339 | local function CFrameFromTopBack(at, top, back) | |
340 | local right = top:Cross(back) | |
341 | return CFrame.new(at.x, at.y, at.z, | |
342 | right.x, top.x, back.x, | |
343 | right.y, top.y, back.y, | |
344 | right.z, top.z, back.z) | |
345 | end | |
346 | ||
347 | function Triangle(a, b, c) | |
348 | local edg1 = (c-a):Dot((b-a).unit) | |
349 | local edg2 = (a-b):Dot((c-b).unit) | |
350 | local edg3 = (b-c):Dot((a-c).unit) | |
351 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
352 | a, b, c = a, b, c | |
353 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
354 | a, b, c = b, c, a | |
355 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
356 | a, b, c = c, a, b | |
357 | else | |
358 | assert(false, "unreachable") | |
359 | end | |
360 | ||
361 | local len1 = (c-a):Dot((b-a).unit) | |
362 | local len2 = (b-a).magnitude - len1 | |
363 | local width = (a + (b-a).unit*len1 - c).magnitude | |
364 | ||
365 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
366 | ||
367 | local list = {} | |
368 | ||
369 | local TrailColor = ("Royal purple") | |
370 | ||
371 | if len1 > 0.01 then | |
372 | local w1 = Instance.new('WedgePart', m) | |
373 | game:GetService("Debris"):AddItem(w1,5) | |
374 | w1.Material = "Neon" | |
375 | w1.FormFactor = 'Custom' | |
376 | w1.BrickColor = BrickColor.new(TrailColor) | |
377 | w1.Transparency = 0 | |
378 | w1.Reflectance = 0 | |
379 | w1.Material = "Neon" | |
380 | w1.CanCollide = false | |
381 | NoOutline(w1) | |
382 | local sz = Vector3.new(0.2, width, len1) | |
383 | w1.Size = sz | |
384 | local sp = Instance.new("SpecialMesh",w1) | |
385 | sp.MeshType = "Wedge" | |
386 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
387 | w1:BreakJoints() | |
388 | w1.Anchored = true | |
389 | w1.Parent = workspace | |
390 | w1.Transparency = 0.7 | |
391 | table.insert(Effects,{w1,"Disappear",.01}) | |
392 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
393 | table.insert(list,w1) | |
394 | end | |
395 | ||
396 | if len2 > 0.01 then | |
397 | local w2 = Instance.new('WedgePart', m) | |
398 | game:GetService("Debris"):AddItem(w2,5) | |
399 | w2.Material = "Neon" | |
400 | w2.FormFactor = 'Custom' | |
401 | w2.BrickColor = BrickColor.new(TrailColor) | |
402 | w2.Transparency = 0 | |
403 | w2.Reflectance = 0 | |
404 | w2.Material = "Neon" | |
405 | w2.CanCollide = false | |
406 | NoOutline(w2) | |
407 | local sz = Vector3.new(0.2, width, len2) | |
408 | w2.Size = sz | |
409 | local sp = Instance.new("SpecialMesh",w2) | |
410 | sp.MeshType = "Wedge" | |
411 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
412 | w2:BreakJoints() | |
413 | w2.Anchored = true | |
414 | w2.Parent = workspace | |
415 | w2.Transparency = 0.7 | |
416 | table.insert(Effects,{w2,"Disappear",.01}) | |
417 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
418 | table.insert(list,w2) | |
419 | end | |
420 | return unpack(list) | |
421 | end | |
422 | ||
423 | ||
424 | so = function(id,par,vol,pit) | |
425 | coroutine.resume(coroutine.create(function() | |
426 | local sou = Instance.new("Sound",par or workspace) | |
427 | sou.Volume=vol | |
428 | sou.Pitch=pit or 1 | |
429 | sou.SoundId=id | |
430 | swait() | |
431 | sou:play() | |
432 | game:GetService("Debris"):AddItem(sou,6) | |
433 | end)) | |
434 | end | |
435 | ||
436 | function clerp(a,b,t) | |
437 | local qa = {QuaternionFromCFrame(a)} | |
438 | local qb = {QuaternionFromCFrame(b)} | |
439 | local ax, ay, az = a.x, a.y, a.z | |
440 | local bx, by, bz = b.x, b.y, b.z | |
441 | local _t = 1-t | |
442 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
443 | end | |
444 | ||
445 | function QuaternionFromCFrame(cf) | |
446 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
447 | local trace = m00 + m11 + m22 | |
448 | if trace > 0 then | |
449 | local s = math.sqrt(1 + trace) | |
450 | local recip = 0.5/s | |
451 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
452 | else | |
453 | local i = 0 | |
454 | if m11 > m00 then | |
455 | i = 1 | |
456 | end | |
457 | if m22 > (i == 0 and m00 or m11) then | |
458 | i = 2 | |
459 | end | |
460 | if i == 0 then | |
461 | local s = math.sqrt(m00-m11-m22+1) | |
462 | local recip = 0.5/s | |
463 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
464 | elseif i == 1 then | |
465 | local s = math.sqrt(m11-m22-m00+1) | |
466 | local recip = 0.5/s | |
467 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
468 | elseif i == 2 then | |
469 | local s = math.sqrt(m22-m00-m11+1) | |
470 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
471 | end | |
472 | end | |
473 | end | |
474 | ||
475 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
476 | local xs, ys, zs = x + x, y + y, z + z | |
477 | local wx, wy, wz = w*xs, w*ys, w*zs | |
478 | local xx = x*xs | |
479 | local xy = x*ys | |
480 | local xz = x*zs | |
481 | local yy = y*ys | |
482 | local yz = y*zs | |
483 | local zz = z*zs | |
484 | 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)) | |
485 | end | |
486 | ||
487 | function QuaternionSlerp(a, b, t) | |
488 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
489 | local startInterp, finishInterp; | |
490 | if cosTheta >= 0.0001 then | |
491 | if (1 - cosTheta) > 0.0001 then | |
492 | local theta = math.acos(cosTheta) | |
493 | local invSinTheta = 1/math.sin(theta) | |
494 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
495 | finishInterp = math.sin(t*theta)*invSinTheta | |
496 | else | |
497 | startInterp = 1-t | |
498 | finishInterp = t | |
499 | end | |
500 | else | |
501 | if (1+cosTheta) > 0.0001 then | |
502 | local theta = math.acos(-cosTheta) | |
503 | local invSinTheta = 1/math.sin(theta) | |
504 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
505 | finishInterp = math.sin(t*theta)*invSinTheta | |
506 | else | |
507 | startInterp = t-1 | |
508 | finishInterp = t | |
509 | end | |
510 | end | |
511 | 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 | |
512 | end | |
513 | ||
514 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
515 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
516 | end | |
517 | ||
518 | Damagefunc=function(Part,hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock) | |
519 | if hit.Parent==nil then | |
520 | return | |
521 | end | |
522 | local h=hit.Parent:FindFirstChild("Humanoid") | |
523 | for _,v in pairs(hit.Parent:children()) do | |
524 | if v:IsA("Humanoid") then | |
525 | h=v | |
526 | end | |
527 | end | |
528 | if hit.Parent.Parent:FindFirstChild("Torso")~=nil then | |
529 | h=hit.Parent.Parent:FindFirstChild("Humanoid") | |
530 | end | |
531 | if hit.Parent.className=="Hat" then | |
532 | hit=hit.Parent.Parent:findFirstChild("Head") | |
533 | end | |
534 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then | |
535 | if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end | |
536 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
537 | return | |
538 | end]] | |
539 | -- hs(hit,1.2) | |
540 | local c=Instance.new("ObjectValue") | |
541 | c.Name="creator" | |
542 | c.Value=game:service("Players").LocalPlayer | |
543 | c.Parent=h | |
544 | game:GetService("Debris"):AddItem(c,.5) | |
545 | local Damage=math.random(minim,maxim) | |
546 | -- h:TakeDamage(Damage) | |
547 | local blocked=false | |
548 | local block=hit.Parent:findFirstChild("Block") | |
549 | if block~=nil then | |
550 | print(block.className) | |
551 | if block.className=="NumberValue" then | |
552 | if block.Value>0 then | |
553 | blocked=true | |
554 | if decreaseblock==nil then | |
555 | block.Value=block.Value-1 | |
556 | end | |
557 | end | |
558 | end | |
559 | if block.className=="IntValue" then | |
560 | if block.Value>0 then | |
561 | blocked=true | |
562 | if decreaseblock~=nil then | |
563 | block.Value=block.Value-1 | |
564 | end | |
565 | end | |
566 | end | |
567 | end | |
568 | if blocked==false then | |
569 | -- h:TakeDamage(Damage) | |
570 | h.Health=h.Health-Damage | |
571 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, Part.BrickColor.Color) | |
572 | else | |
573 | h.Health=h.Health-(Damage/2) | |
574 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Bright blue").Color) | |
575 | end | |
576 | if Type=="Knockdown" then | |
577 | local hum=hit.Parent.Humanoid | |
578 | hum.PlatformStand=true | |
579 | coroutine.resume(coroutine.create(function(HHumanoid) | |
580 | swait(1) | |
581 | HHumanoid.PlatformStand=false | |
582 | end),hum) | |
583 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
584 | --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
585 | local bodvol=Instance.new("BodyVelocity") | |
586 | bodvol.velocity=angle*knockback | |
587 | bodvol.P=5000 | |
588 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
589 | bodvol.Parent=hit | |
590 | local rl=Instance.new("BodyAngularVelocity") | |
591 | rl.P=3000 | |
592 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
593 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
594 | rl.Parent=hit | |
595 | game:GetService("Debris"):AddItem(bodvol,.5) | |
596 | game:GetService("Debris"):AddItem(rl,.5) | |
597 | elseif Type=="Normal" then | |
598 | local vp=Instance.new("BodyVelocity") | |
599 | vp.P=500 | |
600 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
601 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
602 | if KnockbackType==1 then | |
603 | vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 | |
604 | elseif KnockbackType==2 then | |
605 | vp.velocity=Property.CFrame.lookVector*knockback | |
606 | end | |
607 | if knockback>0 then | |
608 | vp.Parent=hit.Parent.Torso | |
609 | end | |
610 | game:GetService("Debris"):AddItem(vp,.5) | |
611 | elseif Type=="Up" then | |
612 | local bodyVelocity=Instance.new("BodyVelocity") | |
613 | bodyVelocity.velocity=vt(0,60,0) | |
614 | bodyVelocity.P=5000 | |
615 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
616 | bodyVelocity.Parent=hit | |
617 | game:GetService("Debris"):AddItem(bodyVelocity,1) | |
618 | local rl=Instance.new("BodyAngularVelocity") | |
619 | rl.P=3000 | |
620 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
621 | rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)) | |
622 | rl.Parent=hit | |
623 | game:GetService("Debris"):AddItem(rl,.5) | |
624 | elseif Type=="Snare" then | |
625 | local bp=Instance.new("BodyPosition") | |
626 | bp.P=2000 | |
627 | bp.D=100 | |
628 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
629 | bp.position=hit.Parent.Torso.Position | |
630 | bp.Parent=hit.Parent.Torso | |
631 | game:GetService("Debris"):AddItem(bp,1) | |
632 | elseif Type=="Target" then | |
633 | local Targetting = false | |
634 | if Targetting==false then | |
635 | ZTarget=hit.Parent.Torso | |
636 | coroutine.resume(coroutine.create(function(Part) | |
637 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) | |
638 | swait(5) | |
639 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) | |
640 | end),ZTarget) | |
641 | local TargHum=ZTarget.Parent:findFirstChild("Humanoid") | |
642 | local targetgui=Instance.new("BillboardGui") | |
643 | targetgui.Parent=ZTarget | |
644 | targetgui.Size=UDim2.new(10,100,10,100) | |
645 | local targ=Instance.new("ImageLabel") | |
646 | targ.Parent=targetgui | |
647 | targ.BackgroundTransparency=1 | |
648 | targ.Image="rbxassetid://4834067" | |
649 | targ.Size=UDim2.new(1,0,1,0) | |
650 | cam.CameraType="Scriptable" | |
651 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
652 | local dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
653 | workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
654 | Targetting=true | |
655 | RocketTarget=ZTarget | |
656 | for i=1,Property do | |
657 | --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do | |
658 | if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then | |
659 | swait() | |
660 | end | |
661 | --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100) | |
662 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
663 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
664 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0) | |
665 | end | |
666 | Targetting=false | |
667 | RocketTarget=nil | |
668 | targetgui.Parent=nil | |
669 | cam.CameraType="Custom" | |
670 | end | |
671 | end | |
672 | local debounce=Instance.new("BoolValue") | |
673 | debounce.Name="DebounceHit" | |
674 | debounce.Parent=hit.Parent | |
675 | debounce.Value=true | |
676 | game:GetService("Debris"):AddItem(debounce,Delay) | |
677 | c=Instance.new("ObjectValue") | |
678 | c.Name="creator" | |
679 | c.Value=Player | |
680 | c.Parent=h | |
681 | game:GetService("Debris"):AddItem(c,.5) | |
682 | end | |
683 | end | |
684 | ||
685 | ||
686 | function ShowDamage(Pos, Text, Time, Color) | |
687 | local Rate = (1 / 30) | |
688 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
689 | local Text = (Text or "") | |
690 | local Time = (Time or 2) | |
691 | local Color = (Color or Color3.new(1, 0, 0)) | |
692 | local EffectPart = part("Custom",workspace,"SmoothPlastic",0,1,BrickColor.new(Color),"Effect",vt(0,0,0)) | |
693 | EffectPart.Anchored = true | |
694 | local BillboardGui = Instance.new("BillboardGui") | |
695 | BillboardGui.Size = UDim2.new(3, 0, 3, 0) | |
696 | BillboardGui.Adornee = EffectPart | |
697 | local TextLabel = Instance.new("TextLabel") | |
698 | TextLabel.BackgroundTransparency = 1 | |
699 | TextLabel.Size = UDim2.new(1, 0, 1, 0) | |
700 | TextLabel.Text = Text | |
701 | TextLabel.TextColor3 = Color | |
702 | TextLabel.TextScaled = true | |
703 | TextLabel.Font = Enum.Font.ArialBold | |
704 | TextLabel.Parent = BillboardGui | |
705 | BillboardGui.Parent = EffectPart | |
706 | game.Debris:AddItem(EffectPart, (Time + 0.1)) | |
707 | EffectPart.Parent = game:GetService("Workspace") | |
708 | Delay(0, function() | |
709 | local Frames = (Time / Rate) | |
710 | for Frame = 1, Frames do | |
711 | wait(Rate) | |
712 | local Percent = (Frame / Frames) | |
713 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
714 | TextLabel.TextTransparency = Percent | |
715 | end | |
716 | if EffectPart and EffectPart.Parent then | |
717 | EffectPart:Destroy() | |
718 | end | |
719 | end) | |
720 | end | |
721 | ||
722 | handle=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Black","Handle",Vector3.new(0.200000003, 1.61857152, 0.200000003)) | |
723 | handleweld=weld(m,Character["Right Arm"],handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.995889783, -0.101109691, 0.0468789339, -5.23798153e-005, 0.99999994, -0.000210702419, -6.36925748e-008, -0.000210702419, -0.99999994, -1, -5.23798008e-005, 7.47295417e-008)) | |
724 | mesh("CylinderMesh",handle,"","",Vector3.new(0, 0, 0),Vector3.new(0.857142806, 1, 0.857142746)) | |
725 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Black","SwordPart",Vector3.new(0.200000003, 0.257142872, 0.911428571)) | |
726 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00982296467, -0.128642559, 5.57254982, -1.21753502e-007, -2.87620594e-010, 1, -1, -1.04306673e-006, -1.2175461e-007, 1.04306673e-006, -1, -2.87123214e-010)) | |
727 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.571428537, 1, 1)) | |
728 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.200000003, 3.74285722, 0.571428657)) | |
729 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.0100114346, 3.24283266, 2.64644623e-005, -2.98713599e-006, -1.63886575e-008, -1, -1.18017197e-005, -0.99999994, 1.64265153e-008, -0.99999994, 1.18017197e-005, 2.98713007e-006)) | |
730 | mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.285714298, 1, 1)) | |
731 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Black","SwordPart",Vector3.new(0.200000003, 3.74285722, 0.514285743)) | |
732 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00896048546, 3.24313331, -6.2584877e-006, -2.62832918e-006, -1.58840017e-008, -1, -1.16825104e-005, -0.99999994, 1.59122848e-008, -0.99999994, 1.16825104e-005, 2.62831986e-006)) | |
733 | mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.571428537, 1, 1)) | |
734 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Black","SwordPart",Vector3.new(0.200000003, 0.914285779, 0.254285723)) | |
735 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0080575943, -5.57459974, 0.127099097, -7.20826961e-007, -1.18548371e-009, 1, 6.25863322e-007, 1, 1.18891563e-009, -1, 6.25863322e-007, -7.20827984e-007)) | |
736 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.571428537, 1, 1)) | |
737 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.200000003, 0.942857206, 0.28285715)) | |
738 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00858414173, -5.58866072, 0.142816901, -5.41048905e-007, -8.99582631e-010, 1, -5.96046448e-007, 0.99999994, 9.00953978e-010, -0.99999994, -5.96046448e-007, -5.41057148e-007)) | |
739 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.285714298, 1, 1)) | |
740 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.200000003, 0.285714328, 0.940000057)) | |
741 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.011053443, -0.142930448, 5.58944941, 2.97432763e-007, 3.64387631e-010, 1, -1, 6.25863322e-007, 2.9743137e-007, -6.25863322e-007, -1, 3.63804986e-010)) | |
742 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.285714298, 1, 1)) | |
743 | Part=part(Enum.FormFactor.Brick,m,Enum.Material.SmoothPlastic,0,0,"Black","SwordPart",Vector3.new(1, 1.20000005, 1)) | |
744 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(3.57627869e-007, -0.809324801, 1.96695328e-006, 6.20105922e-008, 2.27451835e-010, -1, 1.81795622e-006, 1, 2.27856845e-010, 1, -1.81795622e-006, 6.2011928e-008)) | |
745 | mesh("SpecialMesh",Part,Enum.MeshType.Head,"",Vector3.new(0, 0, 0),Vector3.new(0.285714298, 0.142857134, 0.285714298)) | |
746 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.483492821, 0.539954185, 0.539909601)) | |
747 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00226664543, 0.69951874, 1.00827909, 5.41296288e-007, 9.50464596e-010, -1, 0.707107663, -0.707105815, 3.8208583e-007, -0.707105815, -0.707107663, -3.83435292e-007)) | |
748 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.285714179, 0.285714179)) | |
749 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Black","SwordPart",Vector3.new(0.892679513, 0.539954185, 0.771299422)) | |
750 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.19487548, -0.00217807293, 3.74913216e-005, 2.29479338e-006, 1, 7.06279479e-012, -6.20287395e-008, -7.34701189e-012, 1, 1, -2.29479338e-006, 6.20337914e-008)) | |
751 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.857145786, 1)) | |
752 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.892679513, 0.539954185, 0.771299422)) | |
753 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.19487882, -0.00217807293, 4.00543213e-005, 2.0563748e-006, 1, 1.14326326e-011, -6.20178255e-008, -1.28039801e-011, 1, 1, -2.0563748e-006, 6.20228633e-008)) | |
754 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1.10000002, 0.571431458, 1.10000002)) | |
755 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.483492851, 0.539954185, 0.539909601)) | |
756 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00595891476, -1.00750566, 1.00747085, -1.81721958e-007, -3.98678424e-010, 1, -0.707107067, 0.707106411, -1.28216811e-007, -0.707106411, -0.707106948, -1.28784094e-007)) | |
757 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.285714179, 0.285714179)) | |
758 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.483492821, 0.539954185, 0.539909601)) | |
759 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00534570217, -1.00757694, -0.698815584, 2.4158129e-007, 4.89748686e-010, -1, -0.707107604, 0.707105875, -1.70486445e-007, 0.707105815, 0.707107544, 1.71177419e-007)) | |
760 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.285714179, 0.285714269)) | |
761 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.493492872, 0.539954185, 0.539909601)) | |
762 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.000260472298, 0.6988675, -0.698937058, 3.01447898e-007, 5.80818948e-010, -1, -0.707105994, -0.707107365, -2.13563524e-007, -0.707107365, 0.707106113, -2.12752497e-007)) | |
763 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.285714179, 0.285714269)) | |
764 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(1.46267962, 0.200000003, 0.200000003)) | |
765 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00927072763, -0.0121991634, 1.19311547, 0.999999881, -2.08614802e-006, 1.9306286e-007, -1.93059051e-007, -1.09411957e-007, 1, -2.08616257e-006, -0.999999881, -1.09408283e-007)) | |
766 | mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
767 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(1.06267953, 0.200000003, 0.200000003)) | |
768 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.604586363, -0.0121991634, 1.02863288, 0.866026282, 0.499998033, 2.28958157e-007, -1.93872992e-007, -1.22099237e-007, 1, 0.499998033, -0.866026282, -8.79730777e-009)) | |
769 | mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
770 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(1.46267962, 0.200000003, 0.200000003)) | |
771 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.03790355, -0.0121991634, 0.588528812, 0.500001669, 0.866024196, 1.74744486e-007, -1.6279435e-007, -1.0777579e-007, 1, 0.866024196, -0.500001669, 8.71042545e-008)) | |
772 | mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
773 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.662679553, 0.200000003, 0.200000003)) | |
774 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.39311564, -0.0121991634, -0.00927072763, 2.08616257e-006, 0.999999881, 7.82298955e-008, -1.51383063e-007, -7.82268899e-008, 1, 0.999999881, -2.08614802e-006, 1.51386175e-007)) | |
775 | mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
776 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(1.46267951, 0.200000003, 0.200000003)) | |
777 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.02863288, -0.0121997595, -0.604586482, -0.499998093, 0.866026223, -6.44970513e-008, -1.45620604e-007, -9.60127267e-009, 1, 0.866026223, 0.499998093, 1.30918266e-007)) | |
778 | mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
779 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(1.06267953, 0.200000003, 0.200000003)) | |
780 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.588528991, -0.0121992826, -1.03790355, -0.866024137, 0.500001729, -9.11133142e-008, -1.16737233e-007, -1.99774206e-008, 1, 0.500001729, 0.866024137, 7.56750538e-008)) | |
781 | mesh("BlockMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
782 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.372464359, 0.762464345, 0.762464285)) | |
783 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00338602066, -0.736121356, -0.540583551, 5.41296288e-007, 9.50464596e-010, -1, 0.707107663, -0.707105815, 3.8208583e-007, -0.707105815, -0.707107663, -3.83435292e-007)) | |
784 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.895366609, 0.128561974, 0.128542364)) | |
785 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.382464379, 0.762464345, 0.762464285)) | |
786 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00803625584, -0.737174749, 0.736498654, 3.01447898e-007, 5.80818948e-010, -1, -0.707105994, -0.707107365, -2.13563524e-007, -0.707107365, 0.707106113, -2.12752497e-007)) | |
787 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.913885474, 0.128561974, 0.128542408)) | |
788 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.40246433, 0.762464345, 0.762464285)) | |
789 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00594449043, 0.540397167, 0.737201214, 2.4158129e-007, 4.89748686e-010, -1, -0.707107604, 0.707105875, -1.70486445e-007, 0.707105815, 0.707107544, 1.71177419e-007)) | |
790 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.895366609, 0.128561974, 0.128542408)) | |
791 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(0.40246433, 0.762464345, 0.762464285)) | |
792 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00681877136, 0.540436149, -0.541088939, -1.81721958e-007, -3.98678424e-010, 1, -0.707107067, 0.707106411, -1.28216811e-007, -0.707106411, -0.707106948, -1.28784094e-007)) | |
793 | mesh("SpecialMesh",Part,Enum.MeshType.Wedge,"",Vector3.new(0, 0, 0),Vector3.new(0.895366669, 0.128561974, 0.128542364)) | |
794 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Black","SwordPart",Vector3.new(1.26045096, 0.762464345, 0.762464285)) | |
795 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.910848916, -0.00147974491, 0.000465214252, 2.29479338e-006, 1, 7.06279479e-012, -6.20287395e-008, -7.34701189e-012, 1, 1, -2.29479338e-006, 6.20337914e-008)) | |
796 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 0.385687381, 0.642712057)) | |
797 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.Neon,0,0,"Royal purple","SwordPart",Vector3.new(1.26045096, 0.762464345, 0.762464285)) | |
798 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.910846829, -0.00147974491, 0.000467300415, 2.0563748e-006, 1, 1.14326326e-011, -6.20178255e-008, -1.28039801e-011, 1, 1, -2.0563748e-006, 6.20228633e-008)) | |
799 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1.10000002, 0.257125348, 0.706983268)) | |
800 | Part=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,0,"Black","SwordPart",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
801 | Partweld=weld(m,handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.98755074e-005, -0.86527884, -0.00526940823, 0.99999994, -3.33786011e-006, -1.61662047e-006, 3.33786011e-006, 0.99999994, -1.75251103e-009, 1.61662604e-006, 1.74897963e-009, 1)) | |
802 | mesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(0.857142806, 0.857145548, 0.857142746)) | |
803 | Hitbox=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,1,"Black","Hitbox",Vector3.new(0.650000036, 4.19999981, 0.200000003)) | |
804 | Hitboxweld=weld(m,handle,Hitbox,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0107657909, -3.95914412, 0.00325751305, 0.999999821, -0.000211339415, 2.39198562e-006, 0.000211339124, 0.999997795, -6.21902582e-005, -2.38056168e-006, 6.20116552e-005, 0.999992907)) | |
805 | EffectPart=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,1,"Royal purple","EffectPart",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
806 | EffectPartweld=weld(m,handle,EffectPart,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00693154335, 0.014090538, 6.03910685, -5.23798153e-005, -6.36925748e-008, -1, 0.99999994, -0.000210702419, -5.23798008e-005, -0.000210702419, -0.99999994, 7.47295417e-008)) | |
807 | mesh("BlockMesh",EffectPart,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
808 | EffectPart2=part(Enum.FormFactor.Custom,m,Enum.Material.SmoothPlastic,0,1,"Black","EffectPart2",Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
809 | EffectPart2weld=weld(m,Character["Left Arm"],EffectPart2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.15575993, 0.00814216491, -0.0231294632, -5.23798153e-005, 0.999999821, -0.000210702419, -6.36925748e-008, -0.00021070239, -0.99999994, -1, -5.23797935e-005, 7.47295417e-008)) | |
810 | ||
811 | DarkRiftF=function(par) | |
812 | while lol == true do | |
813 | wait() | |
814 | local PWN={} | |
815 | for _,v in pairs(game.Workspace:children()) do | |
816 | if v.className=="Model" and v:FindFirstChild("Humanoid")~=nil then | |
817 | if v.Humanoid.Health>0 and v:FindFirstChild("Torso")~=nil then | |
818 | table.insert(PWN,v.Torso) | |
819 | end | |
820 | end | |
821 | end | |
822 | for _,t in pairs(PWN) do | |
823 | local targ=par.Position-t.Position | |
824 | local Mag=targ.magnitude | |
825 | if not t:IsDescendantOf(Character) and t~=nil and Mag<=50 then | |
826 | if Mag<=30 then | |
827 | t.Parent.Humanoid:TakeDamage(.5) | |
828 | local rl=Instance.new("BodyAngularVelocity") | |
829 | rl.P=3000 | |
830 | rl.maxTorque=Vector3.new(500000,500000,500000)*5000 | |
831 | rl.angularvelocity=Vector3.new(math.random(-20,20),math.random(-20,20),math.random(-20,20))/10 | |
832 | rl.Parent=t | |
833 | game:GetService("Debris"):AddItem(rl,.1) | |
834 | end | |
835 | if Mag<=20 then | |
836 | t.Parent.Humanoid:TakeDamage(.1) | |
837 | else | |
838 | local vl=Instance.new("BodyVelocity") | |
839 | vl.P=3000 | |
840 | vl.maxForce=Vector3.new(50000000000,50000000000,50000000000) | |
841 | vl.velocity=(t.Position-par.Position).unit*-(70/(Mag)) | |
842 | vl.Parent=t | |
843 | game:GetService("Debris"):AddItem(vl,.1) | |
844 | end | |
845 | end | |
846 | end | |
847 | wait(.08) | |
848 | end | |
849 | end | |
850 | ||
851 | function DerpMagic(part,x1,y1,z1,x2,y2,z2,color) | |
852 | local msh1 = Instance.new("BlockMesh") | |
853 | msh1.Scale = Vector3.new(0.5,0.5,0.5) | |
854 | local S=Instance.new("Part") | |
855 | S.Name="Effect" | |
856 | S.Material="Neon" | |
857 | S.formFactor=0 | |
858 | S.Size=Vector3.new(x1,y1,z1) | |
859 | S.BrickColor=color | |
860 | S.Reflectance = 0 | |
861 | S.TopSurface=0 | |
862 | S.BottomSurface=0 | |
863 | S.Transparency=0 | |
864 | S.Anchored=false | |
865 | S.CanCollide=false | |
866 | S.CFrame=part.CFrame | |
867 | S.Parent=game.Workspace | |
868 | msh1.Parent = S | |
869 | local W=Instance.new("Weld") | |
870 | W.Parent=S | |
871 | W.Part0=S | |
872 | W.Part1=part | |
873 | W.C0=CFrame.new(x2,y2,z2) * CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
874 | W.Parent=nil | |
875 | S.Anchored=true | |
876 | coroutine.resume(coroutine.create(function(Part,Weld) for i=1, 9 do Part.Mesh.Scale = Part.Mesh.Scale + Vector3.new(0.1,0.1,0.1) --[[Part.CFrame=Part.CFrame*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50))]] Part.Transparency=i*.1 wait() end Part.Parent=nil Weld.Parent=nil end),S,W) | |
877 | end | |
878 | ||
879 | local function BlackHole(parent,cframe) | |
880 | local effectsmsh = Instance.new("SpecialMesh") | |
881 | effectsmsh.MeshId = "http://www.roblox.com/asset/?id=15887356" | |
882 | --effectsmsh.Scale = Vector3.new(1,1,2.5) | |
883 | effectsmsh.Scale = Vector3.new(3,3,3) | |
884 | local effectsg = Instance.new("Part") | |
885 | effectsg.formFactor = 3 | |
886 | effectsg.CanCollide = false | |
887 | effectsg.Name = "Effect" | |
888 | effectsg.Locked = true | |
889 | effectsg.Transparency = 1 | |
890 | effectsg.Size = Vector3.new(0.2,0.2,0.2) | |
891 | effectsg.Parent = parent | |
892 | effectsg.BrickColor = BrickColor.new("Royal purple") | |
893 | effectsg.Material="Neon" | |
894 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
895 | local Mesh = Instance.new("SpecialMesh") | |
896 | Mesh.Scale = Vector3.new(0.5,0.5,0.5) | |
897 | Mesh.MeshType = "Sphere" | |
898 | -- Mesh.TextureId="http://www.roblox.com/asset/?id=1529460" | |
899 | Part=Instance.new("Part") | |
900 | Part.Name="Effect" | |
901 | Part.formFactor=0 | |
902 | Part.Size=Vector3.new(1,1,1) | |
903 | Part.BrickColor=BrickColor.new("Royal purple") | |
904 | Part.Material="Neon" | |
905 | Part.Reflectance = 0 | |
906 | Part.TopSurface=0 | |
907 | Part.BottomSurface=0 | |
908 | Part.Transparency=0 | |
909 | Part.Anchored=true | |
910 | NoOutline(Part) | |
911 | Part.CanCollide=false | |
912 | Part.CFrame=cframe | |
913 | Part.Parent=parent | |
914 | Mesh.Parent = Part | |
915 | lol=true | |
916 | coroutine.resume(coroutine.create(function() | |
917 | DarkRiftF(Part) | |
918 | end)) | |
919 | for i=0,200 do | |
920 | wait() | |
921 | DerpMagic(Part,1,i/3,1,0,i/3,0,BrickColor.new("Royal purple")) | |
922 | Mesh.Scale=Mesh.Scale-Vector3.new(0.2,0.2,0.2) | |
923 | Part.CFrame=cframe*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
924 | end | |
925 | local fff=200 | |
926 | for i=0,100 do | |
927 | wait() | |
928 | DerpMagic(Part,1,fff/3,1,0,fff/3,0,BrickColor.new("Royal purple")) | |
929 | Part.CFrame=cframe*CFrame.fromEulerAnglesXYZ(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
930 | end | |
931 | for i=0,1,0.05 do | |
932 | wait() | |
933 | Part.Transparency=Part.Transparency+0.05 | |
934 | Mesh.Scale=Mesh.Scale+Vector3.new(1.5,1.5,1.5) | |
935 | end | |
936 | lol=false | |
937 | Part.Parent=nil | |
938 | end),nil,nil) | |
939 | end | |
940 | ||
941 | function makeShockwave(height,color,speed,range,pulse) | |
942 | local range = range or 2000 | |
943 | local p = Instance.new("Part") | |
944 | p.Anchored = true | |
945 | p.CanCollide = false | |
946 | p.FormFactor = "Custom" | |
947 | p.BrickColor = color | |
948 | p.Parent = workspace | |
949 | local m = Instance.new("SpecialMesh",p) | |
950 | m.MeshId = "rbxassetid://3270017" | |
951 | local estimateSurvival = math.floor(range/speed) * 0.03 | |
952 | game:GetService("Debris"):AddItem(p,estimateSurvival) | |
953 | Spawn(function () | |
954 | for i = 1,range,speed do | |
955 | p.Transparency = 1-math.min(0.5,3-(i/500)) | |
956 | m.Scale = Vector3.new(i,i,i*height) | |
957 | p.CFrame = CFrame.new(Torso.Position) * CFrame.Angles(math.rad(90),0,0) | |
958 | wait() | |
959 | end | |
960 | p:Destroy() | |
961 | end) | |
962 | end | |
963 | ||
964 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
965 | local prt=ppart(3,game.Workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
966 | prt.Anchored=true | |
967 | prt.CFrame=cframe | |
968 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(.1,.1,.1)) | |
969 | game:GetService("Debris"):AddItem(prt,2) | |
970 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
971 | for i=0,2,delay do | |
972 | wait() | |
973 | Part.CFrame=Part.CFrame | |
974 | Part.Transparency=i | |
975 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
976 | end | |
977 | Part.Parent=nil | |
978 | end),prt,msh) | |
979 | end | |
980 | ||
981 | function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
982 | local prt=ppart(3,game.Workspace,0,1,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
983 | prt.Anchored=true | |
984 | prt.CFrame=cframe | |
985 | local msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
986 | game:GetService("Debris"):AddItem(prt,5) | |
987 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
988 | for i=0,1,delay do | |
989 | wait() | |
990 | Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
991 | Part.Transparency=i | |
992 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
993 | end | |
994 | Part.Parent=nil | |
995 | end),prt,msh) | |
996 | end | |
997 | ||
998 | local function MagicRing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,Type,parent) | |
999 | local prt=ppart(3,game.Workspace,0,1,brickcolor,"Effect",vt()) | |
1000 | if Type~=2 then | |
1001 | prt.Anchored=true | |
1002 | end | |
1003 | prt.CFrame=cframe | |
1004 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1)) | |
1005 | game:GetService("Debris"):AddItem(prt,5) | |
1006 | coroutine.resume(coroutine.create(function(Part,Mesh,dur) | |
1007 | local wld=nil | |
1008 | if dur==2 then | |
1009 | wld=weld(Part,Part,parent,euler(0,0,0)*cf(0,0,0)) | |
1010 | end | |
1011 | for i=0,1,delay do | |
1012 | swait() | |
1013 | if dur==1 then | |
1014 | Part.CFrame=Part.CFrame | |
1015 | elseif dur==2 then | |
1016 | wld.C0=cframe | |
1017 | end | |
1018 | Part.Transparency=i | |
1019 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1020 | end | |
1021 | Part.Parent=nil | |
1022 | end),prt,msh,Type) | |
1023 | end | |
1024 | ||
1025 | function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1026 | local prt=ppart(3,game.Workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1027 | prt.Anchored=true | |
1028 | prt.CFrame=cframe | |
1029 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1)) | |
1030 | game:GetService("Debris"):AddItem(prt,5) | |
1031 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1032 | for i=0,1,delay do | |
1033 | swait() | |
1034 | Part.CFrame=Part.CFrame*euler(0,0.7,0) | |
1035 | Part.Transparency=i | |
1036 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1037 | end | |
1038 | Part.Parent=nil | |
1039 | end),prt,msh) | |
1040 | end | |
1041 | ||
1042 | function MagicCylinder(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1043 | local prt=ppart(3,workspace,0,0,brickcolor,"Effect",vt(0.2,0.2,0.2)) | |
1044 | prt.Anchored=true | |
1045 | prt.CFrame=cframe | |
1046 | local msh=mesh("SpecialMesh",prt,"Head","",vt(0,0,0),vt(x1,y1,z1)) | |
1047 | game:GetService("Debris"):AddItem(prt,5) | |
1048 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1049 | for i=0,1,delay do | |
1050 | wait() | |
1051 | Part.CFrame=Part.CFrame | |
1052 | Part.Transparency=i | |
1053 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1054 | end | |
1055 | Part.Parent=nil | |
1056 | end),prt,msh) | |
1057 | end | |
1058 | ||
1059 | function MagicWave(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1060 | local prt=ppart(3,workspace,0,0,brickcolor,"Effect",vt()) | |
1061 | prt.Anchored=true | |
1062 | prt.CFrame=cframe | |
1063 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1)) | |
1064 | game:GetService("Debris"):AddItem(prt,5) | |
1065 | table.insert(Effects,{prt,"Cylinder",delay,x3,y3,z3}) | |
1066 | end | |
1067 | ||
1068 | function Blast(parent) | |
1069 | MagicBlock(BrickColor.new("Black"),parent.CFrame,4,4,4,0.2,0.2,0.2,0.01) | |
1070 | MagicWaveThing(BrickColor.new("Black"),parent.CFrame,4,4,4,0.2,0.2,0.2,0.01) | |
1071 | end | |
1072 | ||
1073 | function ChargeBall(parent,t) | |
1074 | local counter=0 | |
1075 | local size=1 | |
1076 | for i=0,t,1 do | |
1077 | swait() | |
1078 | counter=counter+1 | |
1079 | if counter%10==0 then | |
1080 | if size==3 then | |
1081 | MagicRing(BrickColor.new("Black"),parent.CFrame,.5,.5,.5,1,1,1,0.1,3,parent) | |
1082 | elseif size==2 then | |
1083 | MagicRing(BrickColor.new("Black"),parent.CFrame,.5,.5,.5,1,1,1,0.1,3,parent) | |
1084 | end | |
1085 | end | |
1086 | if counter%5==0 then | |
1087 | if size==1 then | |
1088 | MagicBlock(BrickColor.new("Black"),parent.CFrame,.5,.5,.5,1,1,1,0.1,3,parent) | |
1089 | elseif size==2 then | |
1090 | MagicBlock(BrickColor.new("Black"),parent.CFrame,.5,.5,.5,1,1,1,0.1,3,parent) | |
1091 | elseif size==3 then | |
1092 | MagicBlock(BrickColor.new("Black"),parent.CFrame,.5,.5,.5,1,1,1,0.1,3,parent) | |
1093 | end | |
1094 | end | |
1095 | end | |
1096 | end | |
1097 | ||
1098 | function ChargeBall2(parent,t) | |
1099 | local counter=0 | |
1100 | local size=1 | |
1101 | for i=0,t,1 do | |
1102 | swait() | |
1103 | counter=counter+1 | |
1104 | if counter%10==0 then | |
1105 | if size==3 then | |
1106 | MagicRing(BrickColor.new("Black"),parent.CFrame,.5,.5,.5,1,1,1,0.1,3,parent) | |
1107 | elseif size==2 then | |
1108 | MagicRing(BrickColor.new("Black"),parent.CFrame,.5,.5,.5,1,1,1,0.1,3,parent) | |
1109 | end | |
1110 | end | |
1111 | if counter%5==0 then | |
1112 | if size==1 then | |
1113 | MagicBlock(BrickColor.new("Black"),parent.CFrame,.5,.5,.5,1,1,1,0.1,3,parent) | |
1114 | MagicWave(BrickColor.new("Royal purple"),cf(Torso.Position)*cf(0,-1,0)*euler(0,math.random(-50,50),0),1,1,1,1,.5,1,0.05) | |
1115 | elseif size==2 then | |
1116 | MagicBlock(BrickColor.new("Black"),parent.CFrame,.5,.5,.5,1,1,1,0.1,3,parent) | |
1117 | MagicWave(BrickColor.new("Royal purple"),cf(Torso.Position)*cf(0,-1,0)*euler(0,math.random(-50,50),0),1,1,1,1,.5,1,0.05) | |
1118 | elseif size==3 then | |
1119 | MagicBlock(BrickColor.new("Black"),parent.CFrame,.5,.5,.5,1,1,1,0.1,3,parent) | |
1120 | MagicWave(BrickColor.new("Royal purple"),cf(Torso.Position)*cf(0,-1,0)*euler(0,math.random(-50,50),0),1,1,1,1,.5,1,0.05) | |
1121 | end | |
1122 | end | |
1123 | end | |
1124 | end | |
1125 | ||
1126 | function MagniDamage(Part,dis,mind,maxd,force,knock) | |
1127 | for _,c in pairs(workspace:children()) do | |
1128 | local hum=c:findFirstChild("Humanoid") | |
1129 | if hum~=nil then | |
1130 | local head=c:findFirstChild("Torso") | |
1131 | if head~=nil then | |
1132 | local targ=head.Position-Part.Position | |
1133 | local mag=targ.magnitude | |
1134 | if mag<=dis and c.Name~=Character.Name then | |
1135 | Damagefunc(Part,hum.Parent.Torso,mind,maxd,force,knock,RootPart,.2,1) | |
1136 | end | |
1137 | end | |
1138 | end | |
1139 | end | |
1140 | end | |
1141 | ||
1142 | function computeDirection(vec) | |
1143 | local lenSquared = vec.magnitude * vec.magnitude | |
1144 | local invSqrt = 1 / math.sqrt(lenSquared) | |
1145 | return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt) | |
1146 | end | |
1147 | ||
1148 | function attackone() | |
1149 | attack = true | |
1150 | local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"} | |
1151 | local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,4222,112222,math.random(5,5),"Normal",RootPart,.2,1) end) | |
1152 | local fx=Hitbox.Touched:connect(function(part) | |
1153 | local human=part.Parent:findFirstChild("Humanoid") | |
1154 | if human~=nil and bounce==false then | |
1155 | bounce=true | |
1156 | local rndm=math.random(1,#hitsounds) | |
1157 | local r=rndm | |
1158 | so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1) | |
1159 | end | |
1160 | end) | |
1161 | for i = 0,1,0.1 do | |
1162 | swait() | |
1163 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-50)),0.4) | |
1164 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(50)),0.4) | |
1165 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(100)),0.4) | |
1166 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)),0.4) | |
1167 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(120),math.rad(0)),0.4) | |
1168 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(0),math.rad(0)),0.4) | |
1169 | end | |
1170 | so("http://www.roblox.com/asset/?id=199145841",handle,1,.9) | |
1171 | for i = 0,1,0.1 do | |
1172 | swait() | |
1173 | local blcf = Hitbox.CFrame*CFrame.new(0,.5,0) | |
1174 | if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then | |
1175 | local h = 5 | |
1176 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
1177 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
1178 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
1179 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
1180 | scfr = blcf | |
1181 | elseif not scfr then | |
1182 | scfr = blcf | |
1183 | end | |
1184 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),0.4) | |
1185 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(-10),math.rad(-80)),0.4) | |
1186 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4) | |
1187 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4) | |
1188 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(50),math.rad(0)),0.4) | |
1189 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),0.4) | |
1190 | handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(-25),math.rad(0),math.rad(0)),.4) | |
1191 | end | |
1192 | attack = false | |
1193 | bounce=false | |
1194 | scfr=nil | |
1195 | fx:disconnect() | |
1196 | con:disconnect() | |
1197 | end | |
1198 | ||
1199 | function attacktwo() | |
1200 | attack=true | |
1201 | local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"} | |
1202 | local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,4222,112222,math.random(5,5),"Normal",RootPart,.2,1) end) | |
1203 | local fx=Hitbox.Touched:connect(function(part) | |
1204 | local human=part.Parent:findFirstChild("Humanoid") | |
1205 | if human~=nil and bounce==false then | |
1206 | bounce=true | |
1207 | local rndm=math.random(1,#hitsounds) | |
1208 | local r=rndm | |
1209 | so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1) | |
1210 | end | |
1211 | end) | |
1212 | for i=0,1,.1 do | |
1213 | swait() | |
1214 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(70)),0.4) | |
1215 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(-10),math.rad(-70)),0.4) | |
1216 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(120), math.rad(90)),0.4) | |
1217 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)),0.4) | |
1218 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(40),math.rad(0)),0.4) | |
1219 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-140),math.rad(-10)),0.4) | |
1220 | handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(-25),math.rad(0),math.rad(0)),.4) | |
1221 | end | |
1222 | so("http://www.roblox.com/asset/?id=199145887",handle,1,1) | |
1223 | for i = 0,1,0.1 do | |
1224 | swait() | |
1225 | local blcf = Hitbox.CFrame*CFrame.new(0,.5,0) | |
1226 | if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then | |
1227 | local h = 5 | |
1228 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
1229 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
1230 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
1231 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
1232 | scfr = blcf | |
1233 | elseif not scfr then | |
1234 | scfr = blcf | |
1235 | end | |
1236 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.4) | |
1237 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(80)),0.4) | |
1238 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(10), math.rad(90)),0.4) | |
1239 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-90)),0.4) | |
1240 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(140),math.rad(0)),0.4) | |
1241 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-40),math.rad(-10)),0.4) | |
1242 | handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4) | |
1243 | end | |
1244 | scfr=nil | |
1245 | attack=false | |
1246 | bounce=false | |
1247 | con:disconnect() | |
1248 | fx:disconnect() | |
1249 | end | |
1250 | ||
1251 | function attackthree() | |
1252 | attack=true | |
1253 | local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"} | |
1254 | local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,6222,152222,math.random(5,5),"Normal",RootPart,.2,1) end) | |
1255 | local fx=Hitbox.Touched:connect(function(part) | |
1256 | local human=part.Parent:findFirstChild("Humanoid") | |
1257 | if human~=nil and bounce==false then | |
1258 | bounce=true | |
1259 | local rndm=math.random(1,#hitsounds) | |
1260 | local r=rndm | |
1261 | so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1) | |
1262 | end | |
1263 | end) | |
1264 | for i=0,1,.1 do | |
1265 | swait() | |
1266 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-30)),0.4) | |
1267 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(30)),.3) | |
1268 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(170), math.rad(0), math.rad(20)),0.4) | |
1269 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(25), math.rad(0), math.rad(-30)),0.4) | |
1270 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(105),math.rad(0)),0.4) | |
1271 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-75),math.rad(-10)),0.4) | |
1272 | handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.4) | |
1273 | end | |
1274 | so("http://www.roblox.com/asset/?id=199145913",handle,1,.9) | |
1275 | for i = 0,1,0.1 do | |
1276 | swait() | |
1277 | local blcf = Hitbox.CFrame*CFrame.new(0,.5,0) | |
1278 | if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then | |
1279 | local h = 5 | |
1280 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
1281 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
1282 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
1283 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
1284 | scfr = blcf | |
1285 | elseif not scfr then | |
1286 | scfr = blcf | |
1287 | end | |
1288 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(50)),0.4) | |
1289 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-50)),.3) | |
1290 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)),0.4) | |
1291 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)),0.4) | |
1292 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(80),math.rad(0)),0.4) | |
1293 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-100),math.rad(-10)),0.4) | |
1294 | handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(-40),math.rad(0),math.rad(0)),.4) | |
1295 | end | |
1296 | attack=false | |
1297 | bounce=false | |
1298 | scfr=nil | |
1299 | con:disconnect() | |
1300 | fx:disconnect() | |
1301 | end | |
1302 | ||
1303 | function attackfour() | |
1304 | attack = true | |
1305 | local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"} | |
1306 | local con=Hitbox.Touched:connect(function(hit) Damagefunc(Hitbox,hit,9222,18222,math.random(20,30),"Normal",RootPart,.2,1) end) | |
1307 | local fx=Hitbox.Touched:connect(function(part) | |
1308 | local human=part.Parent:findFirstChild("Humanoid") | |
1309 | if human~=nil and bounce==false then | |
1310 | bounce=true | |
1311 | local rndm=math.random(1,#hitsounds) | |
1312 | local r=rndm | |
1313 | so("http://www.roblox.com/asset/?id="..hitsounds[r],part.Parent,1,1) | |
1314 | end | |
1315 | end) | |
1316 | for i = 0,1,0.1 do | |
1317 | swait() | |
1318 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(-5),math.rad(-60)),.3) | |
1319 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(60)),.3) | |
1320 | RW.C0=clerp(RW.C0,cf(1.5, 0.8, 0.2) * angles(math.rad(5), math.rad(-15), math.rad(112)), 0.3) | |
1321 | LW.C0=clerp(LW.C0,cf(-1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(-20)), 0.3) | |
1322 | RH.C0=clerp(RH.C0,cf(1.1,-1,0)*angles(math.rad(-5),math.rad(120),math.rad(-8)),.3) | |
1323 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(5),math.rad(-60),math.rad(0)),.3) | |
1324 | handleweld.C0=clerp(handleweld.C0,cf(0,-.2,.5)*angles(math.rad(50),math.rad(-15),math.rad(0)),.3) | |
1325 | end | |
1326 | so("http://www.roblox.com/asset/?id=199145433",Hitbox,1,1.1) | |
1327 | local v=it("BodyVelocity",Torso) | |
1328 | v.maxForce=Vector3.new(4e+005,4e+005,4e+005)*1 | |
1329 | v.velocity=RootPart.CFrame.lookVector*50 | |
1330 | for i = 0,1,0.1 do | |
1331 | swait() | |
1332 | local blcf = Hitbox.CFrame*cf(0,0,0) | |
1333 | if scfr and (Hitbox.Position-scfr.p).magnitude > .1 then | |
1334 | local h = 5 | |
1335 | local a,b = Triangle((scfr*CFrame.new(0,h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p,(blcf*CFrame.new(0,h/2,0)).p) | |
1336 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
1337 | local a,b = Triangle((blcf*CFrame.new(0,h/2,0)).p,(blcf*CFrame.new(0,-h/2,0)).p,(scfr*CFrame.new(0,-h/2,0)).p) | |
1338 | if a then game.Debris:AddItem(a,1) end if b then game.Debris:AddItem(b,1) end | |
1339 | scfr = blcf | |
1340 | elseif not scfr then | |
1341 | scfr = blcf | |
1342 | end | |
1343 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(5),math.rad(60)),.3) | |
1344 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-60)),.3) | |
1345 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(60), math.rad(100)), 0.3) | |
1346 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-15)), 0.3) | |
1347 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0)),.3) | |
1348 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0)),.3) | |
1349 | handleweld.C0=clerp(handleweld.C0,cf(0,-1,-1)*angles(math.rad(-100),math.rad(0),math.rad(0)),.3) | |
1350 | end | |
1351 | v.Parent=nil | |
1352 | scfr=nil | |
1353 | attack = false | |
1354 | bounce=false | |
1355 | con:disconnect() | |
1356 | fx:disconnect() | |
1357 | end | |
1358 | ||
1359 | function LustrisFulgo() | |
1360 | attack=true | |
1361 | Humanoid.WalkSpeed=0 | |
1362 | for i=0,1,0.1 do | |
1363 | swait() | |
1364 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-15),math.rad(0),math.rad(10)),.3) | |
1365 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-25),math.rad(0),math.rad(-10)),.3) | |
1366 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(145), math.rad(0), math.rad(7)), 0.3) | |
1367 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-30), math.rad(4), math.rad(-15)), 0.3) | |
1368 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-15),math.rad(90),math.rad(0)),.3) | |
1369 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-25),math.rad(-90),math.rad(0)),.3) | |
1370 | handleweld.C0=clerp(handleweld.C0,cf(0,0,-.5)*angles(math.rad(-60),math.rad(0),math.rad(0)),.3) | |
1371 | end | |
1372 | local function boom() | |
1373 | local pprt=ppart(3,game.Workspace,0,1,BrickColor.new("Black"),"Effect",vt(1,1,1)) | |
1374 | pprt.Anchored=true | |
1375 | pprt.CFrame=EffectPart.CFrame | |
1376 | game:GetService("Debris"):AddItem(pprt,2) | |
1377 | MagicCircle(BrickColor.new("Black"),EffectPart.CFrame,20,20,20,-0.01,-0.01,-0.01,0.01) | |
1378 | so("http://roblox.com/asset/?id=228343412",EffectPart,1,0.6) | |
1379 | so("http://roblox.com/asset/?id=228343408",EffectPart,1,1.4) | |
1380 | local wave=part(3,game.Workspace,"Neon",0,.7,BrickColor.new("Black"),"Effect",vt(1,1,1)) | |
1381 | local waveweld=weld(game.Workspace,handle,wave,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.00693154335, 0.014090538, 6.03910685, -5.23798153e-005, -6.36925748e-008, -1, 0.99999994, -0.000210702419, -5.23798008e-005, -0.000210702419, -0.99999994, 7.47295417e-008)) | |
1382 | local wavemesh=mesh("SpecialMesh",wave,"Sphere","",vt(0,0,0),vt(1,1,1)) | |
1383 | MagniDamage(wave,20,15222,25222,math.random(20,30),"Knockdown",RootPart) | |
1384 | for i=0,80 do | |
1385 | swait() | |
1386 | MagicBlock(BrickColor.new("Black"),EffectPart.CFrame,7,7,7,-0.5,-0.5,-0.5,0.05) | |
1387 | MagicCircle(BrickColor.new("Black"),EffectPart.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,5,0),0.5,1,0.5,0.02,1,0.02,0.05) | |
1388 | wave.Size=vt(1+i,1+i,1+i) | |
1389 | wavemesh.Scale=vt(1+i,1+i,1+i) | |
1390 | wave.CFrame=EffectPart.CFrame | |
1391 | Humanoid.Health=Humanoid.Health+.15 | |
1392 | end | |
1393 | wave:Destroy() | |
1394 | end | |
1395 | boom() | |
1396 | attack=false | |
1397 | Humanoid.WalkSpeed=16 | |
1398 | end | |
1399 | ||
1400 | function LeviterGlomus() | |
1401 | attack=true | |
1402 | for i=0,1,.1 do | |
1403 | swait() | |
1404 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(60)),.3) | |
1405 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(-60)),.3) | |
1406 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(18), math.rad(-15), math.rad(15)), 0.3) | |
1407 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-75), math.rad(0), math.rad(-50)), 0.3) | |
1408 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-3),math.rad(65),math.rad(0)),.3) | |
1409 | LH.C0=clerp(LH.C0,cf(-1.1,-1,0)*angles(math.rad(-25),math.rad(-110),math.rad(0))*angles(math.rad(-25),math.rad(0),math.rad(0)),.3) | |
1410 | handleweld.C0=clerp(handleweld.C0,cf(0,.2,-.3)*angles(math.rad(-35),math.rad(-15),math.rad(0)),.3) | |
1411 | end | |
1412 | so("http://www.roblox.com/asset/?id=199145659",EffectPart2,1,1) | |
1413 | efprt=part(Enum.FormFactor.Custom,game.Workspace,Enum.Material.Neon,0,0,"Black","BallEffect",Vector3.new(2, 2, 2)) | |
1414 | weld(m,Character["Left Arm"],efprt,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(1.15575993, 0.00814216491, -0.0231294632, -5.23798153e-005, 0.999999821, -0.000210702419, -6.36925748e-008, -0.00021070239, -0.99999994, -1, -5.23797935e-005, 7.47295417e-008)) | |
1415 | mesh("SpecialMesh",efprt,"Sphere","",vt(0,0,0),vt(1,1,1)) | |
1416 | ChargeBall(EffectPart2,35) | |
1417 | for i=0,1,.1 do | |
1418 | swait() | |
1419 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-60)),.3) | |
1420 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(0),math.rad(60)),.3) | |
1421 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-18), math.rad(15), math.rad(15)), 0.3) | |
1422 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(75), math.rad(0), math.rad(-65)), 0.3) | |
1423 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(110),math.rad(0)),.3) | |
1424 | LH.C0=clerp(LH.C0,cf(-1.1,-1,0)*angles(math.rad(0),math.rad(-70),math.rad(0)),.3) | |
1425 | handleweld.C0=clerp(handleweld.C0,cf(0,.2,-.3)*angles(math.rad(0),math.rad(-15),math.rad(0)),.3) | |
1426 | end | |
1427 | so("http://www.roblox.com/asset/?id=199145534",EffectPart2,1,1.2) | |
1428 | efprt:BreakJoints() | |
1429 | local Target=mouse.Hit.p | |
1430 | local direction = Target - handle.Position | |
1431 | direction = computeDirection(direction) | |
1432 | local pos = handle.Position + (direction * 10.0) | |
1433 | efprt.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles(math.pi/2, 0, 0) | |
1434 | local floatForce = Instance.new("BodyForce") | |
1435 | floatForce.force = Vector3.new(0, efprt:GetMass() * 196.1, 0.0) | |
1436 | floatForce.Parent = efprt | |
1437 | efprt.Velocity = direction * 160 | |
1438 | efprt.Touched:connect(function(hit) | |
1439 | if not hit:IsDescendantOf(Character) then | |
1440 | if hit.Name~="Effect" then | |
1441 | MagniDamage(efprt,15,12225,22225,math.random(20,30),"Knockdown",RootPart) | |
1442 | floatForce.Parent=nil | |
1443 | efprt.Anchored=true | |
1444 | so("http://www.roblox.com/asset/?id=228343330",hit,1,.8) | |
1445 | Blast(efprt) | |
1446 | efprt:Destroy() | |
1447 | end | |
1448 | end | |
1449 | end) | |
1450 | game:GetService("Debris"):AddItem(efprt,6) | |
1451 | attack=false | |
1452 | end | |
1453 | ||
1454 | function PortalStorm() | |
1455 | Humanoid.WalkSpeed=0 | |
1456 | attack=true | |
1457 | for i=0,1,.1 do | |
1458 | swait() | |
1459 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(5),math.rad(0),math.rad(0)),.3) | |
1460 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.3) | |
1461 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(75), math.rad(0), math.rad(-40)), 0.3) | |
1462 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(75), math.rad(0), math.rad(40)), 0.3) | |
1463 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(5),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1464 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(5),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1465 | handleweld.C0=clerp(handleweld.C0,cf(-1,-2.3,-.4)*angles(math.rad(-165),math.rad(-15),math.rad(50)),.3) | |
1466 | end | |
1467 | so("http://www.roblox.com/asset/?id=199145446",handle,1,1) | |
1468 | ChargeBall2(handle,100) | |
1469 | makeShockwave(0.5,BrickColor.new("Royal purple"),30,1000,0) | |
1470 | MagicWave(BrickColor.new("Royal purple"),cf(Torso.Position)*cf(0,-1,0)*euler(0,math.random(-50,50),0),2,2,2,.5,.3,.5,0.01) | |
1471 | so("http://www.roblox.com/asset/?id=280247455",game.Workspace,1,1) | |
1472 | wait(2) | |
1473 | so("http://www.roblox.com/asset/?id=110284742",game.Workspace,1,0) | |
1474 | delay(0.5,function () | |
1475 | MagniDamage(Torso,2000,32225,52220,math.random(50,70),"Knockdown",RootPart) | |
1476 | end) | |
1477 | Humanoid.Health=Humanoid.Health-0 | |
1478 | makeShockwave(4,BrickColor.new("Teal"),10,2000,1) | |
1479 | attack=false | |
1480 | Humanoid.WalkSpeed=9 | |
1481 | wait(4) | |
1482 | Humanoid.WalkSpeed=16 | |
1483 | end | |
1484 | ||
1485 | function SolSiderea() | |
1486 | Humanoid.WalkSpeed=0 | |
1487 | attack=true | |
1488 | so("http://www.roblox.com/asset/?id=280758833",Workspace,1,1.3) | |
1489 | for i=0,1,.1 do | |
1490 | swait() | |
1491 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
1492 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3) | |
1493 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(95), math.rad(-10), math.rad(-17)), 0.3) | |
1494 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(95), math.rad(10), math.rad(17)), 0.3) | |
1495 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1496 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1497 | handleweld.C0=clerp(handleweld.C0,cf(0,-2,-.5)*angles(math.rad(0),math.rad(7.5),math.rad(-75)),.3) | |
1498 | end | |
1499 | for i=0,1,.1 do | |
1500 | swait() | |
1501 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-10),math.rad(0),math.rad(0)),.3) | |
1502 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-25),math.rad(0),math.rad(0)),.3) | |
1503 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(150), math.rad(-5), math.rad(8)), 0.3) | |
1504 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(150), math.rad(5), math.rad(-8)), 0.3) | |
1505 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-10),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1506 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-10),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1507 | handleweld.C0=clerp(handleweld.C0,cf(-1.1,-4,-2)*angles(math.rad(-72),math.rad(8.5),math.rad(-92)),.3) | |
1508 | end | |
1509 | coroutine.resume(coroutine.create(function() ChargeBall(EffectPart,120) end)) | |
1510 | local n=2 | |
1511 | local orb=ppart(3,Character,0,1,BrickColor.new("Royal purple"),"Orb",vt()) | |
1512 | local omsh=mesh("SpecialMesh",orb,"Sphere","",vt(0,0,0),vt(15,15,15)) | |
1513 | local owld=wweld(orb,orb,Torso,cf(-10,-150,0)) | |
1514 | for i=1,0.3,-0.01 do | |
1515 | wait() | |
1516 | orb.Transparency=i | |
1517 | omsh.Scale=omsh.Scale+vt(0.5,0.5,0.5) | |
1518 | MagicBlock(BrickColor.new("Royal purple"),orb.CFrame,15,15,15,2,2,2,0.1) | |
1519 | local ef=ppart(3,workspace,0,0,BrickColor.new("Royal purple"),"Effect",vt()) | |
1520 | ef.Anchored=true | |
1521 | local emsh=mesh("SpecialMesh",ef,"Sphere","",vt(0,0,0),vt(2,math.random(1000,1500)/100,2)) | |
1522 | local ceef=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cf(0,math.random(10,20),0) | |
1523 | ef.CFrame=orb.CFrame*ceef | |
1524 | game:GetService("Debris"):AddItem(ef,2) | |
1525 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1526 | for i=0,1,0.1 do | |
1527 | wait() | |
1528 | Part.Transparency=i | |
1529 | Part.CFrame=Part.CFrame*cf(0,-1,0) | |
1530 | end | |
1531 | Part.Parent=nil | |
1532 | end),ef,emsh) | |
1533 | end | |
1534 | local Pos=cf(orb.Position,Player:GetMouse().Hit.p).lookVector | |
1535 | wait(.5) | |
1536 | orb.Parent=nil | |
1537 | wait(1) | |
1538 | local hit,pos = rayCast(orb.Position,Pos,1000,Character) | |
1539 | local mag=(orb.Position-pos).magnitude | |
1540 | BlackHole(game.Workspace,cf(pos)) | |
1541 | coroutine.resume(coroutine.create(function() | |
1542 | local wave=part(3,game.Workspace,"Neon",0,.7,BrickColor.new("Black"),"Effect",vt(1,1,1)) | |
1543 | wweld(game.Workspace,wave,orb,Torso.CFrame) | |
1544 | local wavemesh=mesh("SpecialMesh",wave,"Sphere","",vt(0,0,0),vt(1,1,1)) | |
1545 | for i=1,100 do | |
1546 | swait() | |
1547 | wave.Size=vt(1+i,1+i,1+i) | |
1548 | wavemesh.Scale=vt(1+i,1+i,1+i) | |
1549 | wave.CFrame=cf(pos) | |
1550 | end | |
1551 | end)) | |
1552 | coroutine.resume(coroutine.create(function() | |
1553 | for i=0,20 do | |
1554 | swait(15) | |
1555 | local range = 1500 | |
1556 | local p = Instance.new("Part") | |
1557 | p.Anchored = true | |
1558 | p.CanCollide = false | |
1559 | p.FormFactor = "Custom" | |
1560 | p.BrickColor = BrickColor.new("Royal purple") | |
1561 | p.Parent = workspace | |
1562 | p.Name="Effect" | |
1563 | p.CFrame=cf(pos) | |
1564 | local m = Instance.new("SpecialMesh",p) | |
1565 | m.MeshId = "rbxassetid://3270017" | |
1566 | local estimateSurvival = math.floor(range/30) * 0.03 | |
1567 | game:GetService("Debris"):AddItem(p,estimateSurvival) | |
1568 | Spawn(function () | |
1569 | for i = 1,range,30 do | |
1570 | p.Transparency = 1-math.min(0.5,3-(i/500)) | |
1571 | m.Scale = Vector3.new(i,i,i*0.5) | |
1572 | p.CFrame = cf(pos) * CFrame.Angles(math.rad(90),0,0) | |
1573 | wait() | |
1574 | end | |
1575 | p:Destroy() | |
1576 | end) | |
1577 | end | |
1578 | end)) | |
1579 | MagicCylinder(BrickColor.new("Royal purple"),CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0),10,mag*5,10,0.5,0,0.5,0.01) | |
1580 | for i=1,2 do | |
1581 | end | |
1582 | for i=1,5 do | |
1583 | tehcf=CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0)*cf(0,(mag/5)*(i/2),0) | |
1584 | end | |
1585 | for i=0,5 do | |
1586 | tehcf=CFrame.new((orb.Position+pos)/2,pos)*euler(1.57,0,0)*cf(0,(-mag/5)*(i/2),0) | |
1587 | end | |
1588 | local ref=ppart(3,workspace,0,1,BrickColor.new("Royal purple"),"Effect",vt()) | |
1589 | ref.CFrame=cf(pos) | |
1590 | coroutine.resume(coroutine.create(function(Part) | |
1591 | wait(1) | |
1592 | Part.Parent=nil | |
1593 | end),ref) | |
1594 | MagniDamage(ref,25,22220,32220,40,"Knockdown",ref) | |
1595 | if hit~=nil then | |
1596 | Damagefunc(ref,hit,5022,70222,60,"Knockdown",RootPart,0) | |
1597 | end | |
1598 | local n=2 | |
1599 | MagicWave(BrickColor.new("Royal purple"),cf(pos)*euler(0,math.random(-50,50),0),2,2,2,.5,.3,.5,0.01) | |
1600 | swait(75) | |
1601 | Humanoid.WalkSpeed=16 | |
1602 | attack=false | |
1603 | end | |
1604 | ||
1605 | attacktype=1 | |
1606 | mouse.Button1Down:connect(function() | |
1607 | if attacktype==1 and attack==false then | |
1608 | attacktype=2 | |
1609 | attackone() | |
1610 | elseif attacktype==2 and attack==false then | |
1611 | attacktype=3 | |
1612 | attacktwo() | |
1613 | elseif attacktype==3 and attack==false then | |
1614 | attacktype=4 | |
1615 | attackthree() | |
1616 | elseif attacktype==4 and attack==false then | |
1617 | attacktype=1 | |
1618 | attackfour() | |
1619 | end | |
1620 | end) | |
1621 | ||
1622 | mouse.KeyDown:connect(function(k) | |
1623 | k=k:lower() | |
1624 | if attack == false and k == 'e' then | |
1625 | LeviterGlomus() | |
1626 | ChargeBall(efprt,100) | |
1627 | end | |
1628 | if attack == false and k == 'q' then | |
1629 | LustrisFulgo() | |
1630 | end | |
1631 | if attack == false and k == 'f' and deeznuts==false then | |
1632 | deeznuts=true | |
1633 | SolSiderea() | |
1634 | deeznuts=false | |
1635 | end | |
1636 | if attack == false and k == 'r' and cooldown==false then | |
1637 | cooldown=true | |
1638 | PortalStorm() | |
1639 | cooldown=false | |
1640 | end | |
1641 | end) | |
1642 | ||
1643 | ||
1644 | local sine = 0 | |
1645 | local change = 1 | |
1646 | local val = 0 | |
1647 | ||
1648 | while true do | |
1649 | swait() | |
1650 | sine = sine + change | |
1651 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
1652 | local velderp=RootPart.Velocity.y | |
1653 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
1654 | if equipped==true or equipped==false then | |
1655 | if attack==false then | |
1656 | idle=idle+1 | |
1657 | else | |
1658 | idle=0 | |
1659 | end | |
1660 | if idle>=500 then | |
1661 | if attack==false then | |
1662 | end | |
1663 | end | |
1664 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
1665 | Anim="Jump" | |
1666 | if attack==false then | |
1667 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1668 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(0),math.rad(0)),.3) | |
1669 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(15)), 0.3) | |
1670 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(-15)), 0.3) | |
1671 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-30),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1672 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-30),math.rad(-90),math.rad(-20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1673 | handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
1674 | end | |
1675 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
1676 | Anim="Fall" | |
1677 | if attack==false then | |
1678 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),.3) | |
1679 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(13),math.rad(0),math.rad(0)),.3) | |
1680 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(20)), 0.3) | |
1681 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(10), math.rad(0), math.rad(-20)), 0.3) | |
1682 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1683 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(-20))*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1684 | handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(-15),math.rad(0),math.rad(0)),.3) | |
1685 | end | |
1686 | elseif torvel<1 and hitfloor~=nil then | |
1687 | Anim="Idle" | |
1688 | if attack==false then | |
1689 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-2),math.rad(0),math.rad(15)),.3) | |
1690 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(2),math.rad(0),math.rad(-15)),.3) | |
1691 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(15), math.rad(0), math.rad(0)), 0.3) | |
1692 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-10), math.rad(0), math.rad(0)), 0.3) | |
1693 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(-2),math.rad(85),math.rad(0)),.3) | |
1694 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(-4),math.rad(-95),math.rad(0)),.3) | |
1695 | handleweld.C0=clerp(handleweld.C0,cf(0,0,0)*angles(math.rad(-10),math.rad(-2),math.rad(0)),.2) | |
1696 | end | |
1697 | elseif torvel>2 and hitfloor~=nil then | |
1698 | Anim="Walk" | |
1699 | if attack==false then | |
1700 | change=3 | |
1701 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(-20)),.3) | |
1702 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10),math.rad(-5),math.rad(25)),.3) | |
1703 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-30), math.rad(-25), math.rad(5)), 0.3) | |
1704 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(30)*math.cos(sine/10), math.rad(5), math.rad(0)), 0.3) | |
1705 | RH.C0=clerp(RH.C0,cf(1.1,-.9,0)*angles(math.rad(0),math.rad(110),math.rad(0)),.3) | |
1706 | LH.C0=clerp(LH.C0,cf(-1.1,-.9,0)*angles(math.rad(0),math.rad(-70),math.rad(0)),.3) | |
1707 | handleweld.C0=clerp(handleweld.C0,cf(0,0,.3)*angles(math.rad(10),math.rad(0),math.rad(0)),.3) | |
1708 | end | |
1709 | end | |
1710 | end | |
1711 | if #Effects>0 then | |
1712 | for e=1,#Effects do | |
1713 | if Effects[e]~=nil then | |
1714 | local Thing=Effects[e] | |
1715 | if Thing~=nil then | |
1716 | local Part=Thing[1] | |
1717 | local Mode=Thing[2] | |
1718 | local Delay=Thing[3] | |
1719 | local IncX=Thing[4] | |
1720 | local IncY=Thing[5] | |
1721 | local IncZ=Thing[6] | |
1722 | if Thing[1].Transparency<=1 then | |
1723 | if Thing[2]=="Block1" then | |
1724 | Thing[1].CFrame=Thing[1].CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1725 | Mesh=Thing[1].Mesh | |
1726 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
1727 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1728 | elseif Thing[2]=="Cylinder" then | |
1729 | Mesh=Thing[1].Mesh | |
1730 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
1731 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1732 | elseif Thing[2]=="Blood" then | |
1733 | Mesh=Thing[7] | |
1734 | Thing[1].CFrame=Thing[1].CFrame*cf(0,.5,0) | |
1735 | Mesh.Scale=Mesh.Scale+vt(Thing[4],Thing[5],Thing[6]) | |
1736 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1737 | elseif Thing[2]=="Elec" then | |
1738 | Mesh=Thing[1].Mesh | |
1739 | Mesh.Scale=Mesh.Scale+vt(Thing[7],Thing[8],Thing[9]) | |
1740 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1741 | elseif Thing[2]=="Disappear" then | |
1742 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1743 | end | |
1744 | else | |
1745 | Part.Parent=nil | |
1746 | table.remove(Effects,e) | |
1747 | end | |
1748 | end | |
1749 | end | |
1750 | end | |
1751 | end | |
1752 | end |