SHOW:
|
|
- or go back to the newest paste.
1 | - | warn'any options for magic' |
1 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
2 | - | plr = game.Players.LocalPlayer |
2 | + | local Player,Mouse,mouse,UserInputService,ContextActionService = owner |
3 | do | |
4 | print("FE Compatibility code by Mokiros") | |
5 | script.Parent = Player.Character | |
6 | ||
7 | --RemoteEvent for communicating | |
8 | local Event = Instance.new("RemoteEvent") | |
9 | Event.Name = "UserInput_Event" | |
10 | ||
11 | --Fake event to make stuff like Mouse.KeyDown work | |
12 | local function fakeEvent() | |
13 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end} | |
14 | t.connect = t.Connect | |
15 | return t | |
16 | end | |
17 | ||
18 | --Creating fake input objects with fake variables | |
19 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
20 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
21 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
22 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
23 | end} | |
24 | --Merged 2 functions into one by checking amount of arguments | |
25 | CAS.UnbindAction = CAS.BindAction | |
26 | ||
27 | --This function will trigger the events that have been :Connect()'ed | |
28 | local function te(self,ev,...) | |
29 | local t = m[ev] | |
30 | if t and t._fakeEvent and t.Function then | |
31 | t.Function(...) | |
32 | end | |
33 | end | |
34 | m.TrigEvent = te | |
35 | UIS.TrigEvent = te | |
36 | ||
37 | Event.OnServerEvent:Connect(function(plr,io) | |
38 | if plr~=Player then return end | |
39 | if io.isMouse then | |
40 | m.Target = io.Target | |
41 | m.Hit = io.Hit | |
42 | else | |
43 | local b = io.UserInputState == Enum.UserInputState.Begin | |
44 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
45 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
46 | end | |
47 | for _,t in pairs(CAS.Actions) do | |
48 | for _,k in pairs(t.Keys) do | |
49 | if k==io.KeyCode then | |
50 | t.Function(t.Name,io.UserInputState,io) | |
51 | end | |
52 | end | |
53 | end | |
54 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
55 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
56 | end | |
57 | end) | |
58 | Event.Parent = NLS([==[ | |
59 | local Player = game:GetService("Players").LocalPlayer | |
60 | local Event = script:WaitForChild("UserInput_Event") | |
61 | ||
62 | local UIS = game:GetService("UserInputService") | |
63 | local input = function(io,a) | |
64 | if a then return end | |
65 | --Since InputObject is a client-side instance, we create and pass table instead | |
66 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState}) | |
67 | end | |
68 | UIS.InputBegan:Connect(input) | |
69 | UIS.InputEnded:Connect(input) | |
70 | ||
71 | local Mouse = Player:GetMouse() | |
72 | local h,t | |
73 | --Give the server mouse data 30 times every second, but only if the values changed | |
74 | --If player is not moving their mouse, client won't fire events | |
75 | while wait(1/30) do | |
76 | if h~=Mouse.Hit or t~=Mouse.Target then | |
77 | h,t=Mouse.Hit,Mouse.Target | |
78 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
79 | end | |
80 | end]==],Player.Character) | |
81 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
82 | end | |
83 | ||
84 | plr = owner | |
85 | char = plr.Character | |
86 | hum = char.Humanoid | |
87 | local cam = game.Workspace.CurrentCamera | |
88 | t = char.Torso | |
89 | h = char.Head | |
90 | ra = char["Right Arm"] | |
91 | la = char["Left Arm"] | |
92 | rl = char["Right Leg"] | |
93 | ll = char["Left Leg"] | |
94 | tors = char.Torso | |
95 | lleg = char["Left Leg"] | |
96 | root = char.HumanoidRootPart | |
97 | hed = char.Head | |
98 | rleg = char["Right Leg"] | |
99 | rarm = char["Right Arm"] | |
100 | larm = char["Left Arm"] | |
101 | vt = Vector3.new | |
102 | bc = BrickColor.new | |
103 | br = BrickColor.random | |
104 | it = Instance.new | |
105 | cf = CFrame.new | |
106 | ||
107 | ||
108 | local Create = LoadLibrary("RbxUtility").Create | |
109 | ||
110 | CFuncs = { | |
111 | ["Part"] = { | |
112 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
113 | local Part = Create("Part"){ | |
114 | Parent = Parent, | |
115 | Reflectance = Reflectance, | |
116 | Transparency = Transparency, | |
117 | CanCollide = false, | |
118 | Locked = true, | |
119 | BrickColor = BrickColor.new(tostring(BColor)), | |
120 | Name = Name, | |
121 | Size = Size, | |
122 | Material = Material, | |
123 | } | |
124 | RemoveOutlines(Part) | |
125 | return Part | |
126 | end; | |
127 | }; | |
128 | ||
129 | ["Mesh"] = { | |
130 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
131 | local Msh = Create(Mesh){ | |
132 | Parent = Part, | |
133 | Offset = OffSet, | |
134 | Scale = Scale, | |
135 | } | |
136 | if Mesh == "SpecialMesh" then | |
137 | Msh.MeshType = MeshType | |
138 | Msh.MeshId = MeshId | |
139 | end | |
140 | return Msh | |
141 | end; | |
142 | }; | |
143 | ||
144 | ["Mesh"] = { | |
145 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
146 | local Msh = Create(Mesh){ | |
147 | Parent = Part, | |
148 | Offset = OffSet, | |
149 | Scale = Scale, | |
150 | } | |
151 | if Mesh == "SpecialMesh" then | |
152 | Msh.MeshType = MeshType | |
153 | Msh.MeshId = MeshId | |
154 | end | |
155 | return Msh | |
156 | end; | |
157 | }; | |
158 | ||
159 | ["Weld"] = { | |
160 | Create = function(Parent, Part0, Part1, C0, C1) | |
161 | local Weld = Create("Weld"){ | |
162 | Parent = Parent, | |
163 | Part0 = Part0, | |
164 | Part1 = Part1, | |
165 | C0 = C0, | |
166 | C1 = C1, | |
167 | } | |
168 | return Weld | |
169 | end; | |
170 | }; | |
171 | ||
172 | ["Sound"] = { | |
173 | Create = function(id, par, vol, pit) | |
174 | coroutine.resume(coroutine.create(function() | |
175 | local S = Create("Sound"){ | |
176 | Volume = vol, | |
177 | Pitch = pit or 1, | |
178 | SoundId = id, | |
179 | Parent = par or workspace, | |
180 | } | |
181 | wait() | |
182 | S:play() | |
183 | game:GetService("Debris"):AddItem(S, 10) | |
184 | end)) | |
185 | end; | |
186 | }; | |
187 | ||
188 | ["ParticleEmitter"] = { | |
189 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
190 | local fp = Create("ParticleEmitter"){ | |
191 | Parent = Parent, | |
192 | Color = ColorSequence.new(Color1, Color2), | |
193 | LightEmission = LightEmission, | |
194 | Size = Size, | |
195 | Texture = Texture, | |
196 | Transparency = Transparency, | |
197 | - | Player=game:GetService("Players").LocalPlayer |
197 | + | |
198 | Acceleration = Accel, | |
199 | Drag = Drag, | |
200 | LockedToPart = LockedToPart, | |
201 | VelocityInheritance = VelocityInheritance, | |
202 | EmissionDirection = EmissionDirection, | |
203 | Enabled = Enabled, | |
204 | Lifetime = LifeTime, | |
205 | Rate = Rate, | |
206 | Rotation = Rotation, | |
207 | RotSpeed = RotSpeed, | |
208 | Speed = Speed, | |
209 | VelocitySpread = VelocitySpread, | |
210 | } | |
211 | return fp | |
212 | end; | |
213 | }; | |
214 | ||
215 | CreateTemplate = { | |
216 | ||
217 | }; | |
218 | } | |
219 | ||
220 | ||
221 | ||
222 | New = function(Object, Parent, Name, Data) | |
223 | local Object = Instance.new(Object) | |
224 | for Index, Value in pairs(Data or {}) do | |
225 | Object[Index] = Value | |
226 | end | |
227 | Object.Parent = Parent | |
228 | Object.Name = Name | |
229 | return Object | |
230 | end | |
231 | local m = Instance.new("Model",char) | |
232 | ||
233 | function CreatePart(parent,transparency,reflectance,material,brickcolor) | |
234 | local p = Instance.new("Part") | |
235 | p.Parent = parent | |
236 | p.Size = Vector3.new(1,1,1) | |
237 | p.Transparency = transparency | |
238 | p.Reflectance = reflectance | |
239 | p.CanCollide = false | |
240 | p.Locked = true | |
241 | p.BrickColor = brickcolor | |
242 | p.Material = material | |
243 | return p | |
244 | end | |
245 | ||
246 | function CreateMesh(parent,meshtype,x1,y1,z1) | |
247 | local mesh = Instance.new("SpecialMesh",parent) | |
248 | mesh.MeshType = meshtype | |
249 | mesh.Scale = Vector3.new(x1,y1,z1) | |
250 | - | mouse=Player:GetMouse() |
250 | + | |
251 | end | |
252 | ||
253 | function CreateSpecialGlowMesh(parent,meshid,x1,y1,z1) | |
254 | local mesh = Instance.new("SpecialMesh",parent) | |
255 | mesh.MeshType = "FileMesh" | |
256 | mesh.MeshId = meshid | |
257 | mesh.TextureId = "http://www.roblox.com/asset/?id=269748808" | |
258 | mesh.Scale = Vector3.new(x1,y1,z1) | |
259 | mesh.VertexColor = Vector3.new(parent.BrickColor.r, parent.BrickColor.g, parent.BrickColor.b) | |
260 | return mesh | |
261 | end | |
262 | ||
263 | function CreateWeld(parent,part0,part1,C1X,C1Y,C1Z,C1Xa,C1Ya,C1Za,C0X,C0Y,C0Z,C0Xa,C0Ya,C0Za) | |
264 | local weld = Instance.new("Weld") | |
265 | weld.Parent = parent | |
266 | weld.Part0 = part0 | |
267 | weld.Part1 = part1 | |
268 | weld.C1 = CFrame.new(C1X,C1Y,C1Z)*CFrame.Angles(C1Xa,C1Ya,C1Za) | |
269 | weld.C0 = CFrame.new(C0X,C0Y,C0Z)*CFrame.Angles(C0Xa,C0Ya,C0Za) | |
270 | return weld | |
271 | end | |
272 | ||
273 | ||
274 | local sorb = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random()) | |
275 | CreateWeld(sorb,rarm,sorb,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
276 | local sorb2 = CreatePart(m,1,1,"SmoothPlastic",BrickColor.random()) | |
277 | CreateWeld(sorb2,larm,sorb2,0,2,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
278 | ||
279 | Player=owner | |
280 | Character=Player.Character | |
281 | PlayerGui=Player.PlayerGui | |
282 | Backpack=Player.Backpack | |
283 | Torso=Character.Torso | |
284 | Head=Character.Head | |
285 | Humanoid=Character.Humanoid | |
286 | m=Instance.new('Model',Character) | |
287 | LeftArm=Character["Left Arm"] | |
288 | LeftLeg=Character["Left Leg"] | |
289 | RightArm=Character["Right Arm"] | |
290 | RightLeg=Character["Right Leg"] | |
291 | LS=Torso["Left Shoulder"] | |
292 | LH=Torso["Left Hip"] | |
293 | RS=Torso["Right Shoulder"] | |
294 | RH=Torso["Right Hip"] | |
295 | Face = Head.face | |
296 | Neck=Torso.Neck | |
297 | it=Instance.new | |
298 | attacktype=1 | |
299 | vt=Vector3.new | |
300 | cf=CFrame.new | |
301 | euler=CFrame.fromEulerAnglesXYZ | |
302 | angles=CFrame.Angles | |
303 | cloaked=false | |
304 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
305 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
306 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
307 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
308 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
309 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
310 | RootPart=Character.HumanoidRootPart | |
311 | RootJoint=RootPart.RootJoint | |
312 | RootCF=euler(-1.57,0,3.14) | |
313 | attack = false | |
314 | attackdebounce = false | |
315 | deb=false | |
316 | equipped=true | |
317 | hand=false | |
318 | MMouse=nil | |
319 | combo=0 | |
320 | mana=0 | |
321 | trispeed=.2 | |
322 | attackmode='none' | |
323 | local idle=0 | |
324 | local Anim="Idle" | |
325 | local Effects={} | |
326 | local gun=false | |
327 | local shoot=false | |
328 | local sine = 0 | |
329 | local change = 1 | |
330 | player=nil | |
331 | ||
332 | --save shoulders | |
333 | RSH, LSH=nil, nil | |
334 | --welds | |
335 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
336 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
337 | LH=Torso["Left Hip"] | |
338 | RH=Torso["Right Hip"] | |
339 | TorsoColor=Torso.BrickColor | |
340 | function NoOutline(Part) | |
341 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
342 | end | |
343 | player=Player | |
344 | ch=Character | |
345 | RSH=ch.Torso["Right Shoulder"] | |
346 | LSH=ch.Torso["Left Shoulder"] | |
347 | -- | |
348 | RSH.Parent=nil | |
349 | LSH.Parent=nil | |
350 | -- | |
351 | RW.Name="Right Shoulder" | |
352 | RW.Part0=ch.Torso | |
353 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
354 | RW.C1=cf(0, 0.5, 0) | |
355 | RW.Part1=ch["Right Arm"] | |
356 | RW.Parent=ch.Torso | |
357 | -- | |
358 | LW.Name="Left Shoulder" | |
359 | LW.Part0=ch.Torso | |
360 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
361 | LW.C1=cf(0, 0.5, 0) | |
362 | LW.Part1=ch["Left Arm"] | |
363 | LW.Parent=ch.Torso | |
364 | ||
365 | local Stats=Instance.new("BoolValue") | |
366 | Stats.Name="Stats" | |
367 | Stats.Parent=Character | |
368 | local Atk=Instance.new("NumberValue") | |
369 | Atk.Name="Damage" | |
370 | Atk.Parent=Stats | |
371 | Atk.Value=1 | |
372 | local Def=Instance.new("NumberValue") | |
373 | Def.Name="Defense" | |
374 | Def.Parent=Stats | |
375 | Def.Value=1 | |
376 | local Speed=Instance.new("NumberValue") | |
377 | Speed.Name="Speed" | |
378 | Speed.Parent=Stats | |
379 | Speed.Value=1 | |
380 | local Mvmt=Instance.new("NumberValue") | |
381 | Mvmt.Name="Movement" | |
382 | Mvmt.Parent=Stats | |
383 | Mvmt.Value=1 | |
384 | ||
385 | local donum=0 | |
386 | ||
387 | ||
388 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
389 | local fp=it("Part") | |
390 | fp.formFactor=formfactor | |
391 | fp.Parent=parent | |
392 | fp.Reflectance=reflectance | |
393 | fp.Transparency=transparency | |
394 | fp.CanCollide=false | |
395 | fp.Locked=true | |
396 | fp.BrickColor=brickcolor | |
397 | fp.Name=name | |
398 | fp.Size=size | |
399 | fp.Position=Torso.Position | |
400 | NoOutline(fp) | |
401 | fp.Material="SmoothPlastic" | |
402 | fp:BreakJoints() | |
403 | return fp | |
404 | end | |
405 | ||
406 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
407 | local mesh=it(Mesh) | |
408 | mesh.Parent=part | |
409 | if Mesh=="SpecialMesh" then | |
410 | mesh.MeshType=meshtype | |
411 | if meshid~="nil" then | |
412 | mesh.MeshId="http://www.roblox.com/asset/?id="..meshid | |
413 | end | |
414 | end | |
415 | mesh.Offset=offset | |
416 | mesh.Scale=scale | |
417 | return mesh | |
418 | end | |
419 | ||
420 | function weld(parent,part0,part1,c0) | |
421 | local weld=it("Weld") | |
422 | weld.Parent=parent | |
423 | weld.Part0=part0 | |
424 | weld.Part1=part1 | |
425 | weld.C0=c0 | |
426 | return weld | |
427 | end | |
428 | ||
429 | local Color1=Torso.BrickColor | |
430 | ||
431 | local bodvel=Instance.new("BodyVelocity") | |
432 | local bg=Instance.new("BodyGyro") | |
433 | ||
434 | function swait(num) | |
435 | if num==0 or num==nil then | |
436 | game:service'RunService'.Stepped:wait(0) | |
437 | else | |
438 | for i=0,num do | |
439 | game:service'RunService'.Stepped:wait(0) | |
440 | end | |
441 | end | |
442 | end | |
443 | ||
444 | ||
445 | so = function(id,par,vol,pit) | |
446 | coroutine.resume(coroutine.create(function() | |
447 | local sou = Instance.new("Sound",par or workspace) | |
448 | sou.Volume=vol | |
449 | sou.Pitch=pit or 1 | |
450 | sou.SoundId=id | |
451 | swait() | |
452 | sou:play() | |
453 | game:GetService("Debris"):AddItem(sou,6) | |
454 | end)) | |
455 | end | |
456 | ||
457 | function clerp(a,b,t) | |
458 | local qa = {QuaternionFromCFrame(a)} | |
459 | local qb = {QuaternionFromCFrame(b)} | |
460 | local ax, ay, az = a.x, a.y, a.z | |
461 | local bx, by, bz = b.x, b.y, b.z | |
462 | local _t = 1-t | |
463 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
464 | end | |
465 | ||
466 | function QuaternionFromCFrame(cf) | |
467 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
468 | local trace = m00 + m11 + m22 | |
469 | if trace > 0 then | |
470 | local s = math.sqrt(1 + trace) | |
471 | local recip = 0.5/s | |
472 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
473 | else | |
474 | local i = 0 | |
475 | if m11 > m00 then | |
476 | i = 1 | |
477 | end | |
478 | if m22 > (i == 0 and m00 or m11) then | |
479 | i = 2 | |
480 | end | |
481 | if i == 0 then | |
482 | local s = math.sqrt(m00-m11-m22+1) | |
483 | local recip = 0.5/s | |
484 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
485 | elseif i == 1 then | |
486 | local s = math.sqrt(m11-m22-m00+1) | |
487 | local recip = 0.5/s | |
488 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
489 | elseif i == 2 then | |
490 | local s = math.sqrt(m22-m00-m11+1) | |
491 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
492 | end | |
493 | end | |
494 | end | |
495 | ||
496 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
497 | local xs, ys, zs = x + x, y + y, z + z | |
498 | local wx, wy, wz = w*xs, w*ys, w*zs | |
499 | local xx = x*xs | |
500 | local xy = x*ys | |
501 | local xz = x*zs | |
502 | local yy = y*ys | |
503 | local yz = y*zs | |
504 | local zz = z*zs | |
505 | 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)) | |
506 | end | |
507 | ||
508 | function QuaternionSlerp(a, b, t) | |
509 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
510 | local startInterp, finishInterp; | |
511 | if cosTheta >= 0.0001 then | |
512 | if (1 - cosTheta) > 0.0001 then | |
513 | local theta = math.acos(cosTheta) | |
514 | local invSinTheta = 1/math.sin(theta) | |
515 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
516 | finishInterp = math.sin(t*theta)*invSinTheta | |
517 | else | |
518 | startInterp = 1-t | |
519 | finishInterp = t | |
520 | end | |
521 | else | |
522 | if (1+cosTheta) > 0.0001 then | |
523 | local theta = math.acos(-cosTheta) | |
524 | local invSinTheta = 1/math.sin(theta) | |
525 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
526 | finishInterp = math.sin(t*theta)*invSinTheta | |
527 | else | |
528 | startInterp = t-1 | |
529 | finishInterp = t | |
530 | end | |
531 | end | |
532 | 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 | |
533 | end | |
534 | ||
535 | local function CFrameFromTopBack(at, top, back) | |
536 | local right = top:Cross(back) | |
537 | return CFrame.new(at.x, at.y, at.z, | |
538 | right.x, top.x, back.x, | |
539 | right.y, top.y, back.y, | |
540 | right.z, top.z, back.z) | |
541 | end | |
542 | ||
543 | function Triangle(a, b, c) | |
544 | local edg1 = (c-a):Dot((b-a).unit) | |
545 | local edg2 = (a-b):Dot((c-b).unit) | |
546 | local edg3 = (b-c):Dot((a-c).unit) | |
547 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
548 | a, b, c = a, b, c | |
549 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
550 | a, b, c = b, c, a | |
551 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
552 | a, b, c = c, a, b | |
553 | else | |
554 | assert(false, "unreachable") | |
555 | end | |
556 | ||
557 | local len1 = (c-a):Dot((b-a).unit) | |
558 | local len2 = (b-a).magnitude - len1 | |
559 | local width = (a + (b-a).unit*len1 - c).magnitude | |
560 | ||
561 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
562 | ||
563 | local list = {} | |
564 | ||
565 | if len1 > 0.01 then | |
566 | local w1 = Instance.new('WedgePart', m) | |
567 | game:GetService("Debris"):AddItem(w1,5) | |
568 | w1.Material = "SmoothPlastic" | |
569 | w1.FormFactor = 'Custom' | |
570 | w1.BrickColor = BrickColor.new("Really red") | |
571 | w1.Transparency = 0 | |
572 | w1.Reflectance = 0 | |
573 | w1.Material = "SmoothPlastic" | |
574 | w1.CanCollide = false | |
575 | local l1 = Instance.new("PointLight",w1) | |
576 | l1.Color = Color3.new(170,0,0) | |
577 | NoOutline(w1) | |
578 | local sz = Vector3.new(0.2, width, len1) | |
579 | w1.Size = sz | |
580 | local sp = Instance.new("SpecialMesh",w1) | |
581 | sp.MeshType = "Wedge" | |
582 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
583 | w1:BreakJoints() | |
584 | w1.Anchored = true | |
585 | w1.Parent = workspace | |
586 | w1.Transparency = 0.7 | |
587 | table.insert(Effects,{w1,"Disappear",.01}) | |
588 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
589 | table.insert(list,w1) | |
590 | end | |
591 | ||
592 | if len2 > 0.01 then | |
593 | local w2 = Instance.new('WedgePart', m) | |
594 | game:GetService("Debris"):AddItem(w2,5) | |
595 | w2.Material = "SmoothPlastic" | |
596 | w2.FormFactor = 'Custom' | |
597 | w2.BrickColor = BrickColor.new("Really red") | |
598 | w2.Transparency = 0 | |
599 | w2.Reflectance = 0 | |
600 | w2.Material = "SmoothPlastic" | |
601 | w2.CanCollide = false | |
602 | local l2 = Instance.new("PointLight",w2) | |
603 | l2.Color = Color3.new(170,0,0) | |
604 | NoOutline(w2) | |
605 | local sz = Vector3.new(0.2, width, len2) | |
606 | w2.Size = sz | |
607 | local sp = Instance.new("SpecialMesh",w2) | |
608 | sp.MeshType = "Wedge" | |
609 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
610 | w2:BreakJoints() | |
611 | w2.Anchored = true | |
612 | w2.Parent = workspace | |
613 | w2.Transparency = 0.7 | |
614 | table.insert(Effects,{w2,"Disappear",.01}) | |
615 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
616 | table.insert(list,w2) | |
617 | end | |
618 | return unpack(list) | |
619 | end | |
620 | ||
621 | ||
622 | Damagefunc=function(hit,minim,maxim,knockback,Type,Property,Delay,KnockbackType,decreaseblock) | |
623 | if hit.Parent==nil then | |
624 | return | |
625 | end | |
626 | h=hit.Parent:FindFirstChild("Humanoid") | |
627 | for _,v in pairs(hit.Parent:children()) do | |
628 | if v:IsA("Humanoid") then | |
629 | h=v | |
630 | end | |
631 | end | |
632 | if hit.Parent.Parent:FindFirstChild("Torso")~=nil then | |
633 | h=hit.Parent.Parent:FindFirstChild("Humanoid") | |
634 | end | |
635 | if hit.Parent.className=="Hat" then | |
636 | hit=hit.Parent.Parent:findFirstChild("Head") | |
637 | end | |
638 | if h~=nil and hit.Parent.Name~=Character.Name and hit.Parent:FindFirstChild("Torso")~=nil then | |
639 | if hit.Parent:findFirstChild("DebounceHit")~=nil then if hit.Parent.DebounceHit.Value==true then return end end | |
640 | --[[ if game.Players:GetPlayerFromCharacter(hit.Parent)~=nil then | |
641 | return | |
642 | end]] | |
643 | -- hs(hit,1.2) | |
644 | c=Instance.new("ObjectValue") | |
645 | c.Name="creator" | |
646 | c.Value=game:service("Players").LocalPlayer | |
647 | c.Parent=h | |
648 | game:GetService("Debris"):AddItem(c,.5) | |
649 | Damage=math.random(minim,maxim) | |
650 | -- h:TakeDamage(Damage) | |
651 | blocked=false | |
652 | block=hit.Parent:findFirstChild("Block") | |
653 | if block~=nil then | |
654 | print(block.className) | |
655 | if block.className=="NumberValue" then | |
656 | if block.Value>0 then | |
657 | blocked=true | |
658 | if decreaseblock==nil then | |
659 | block.Value=block.Value-1 | |
660 | end | |
661 | end | |
662 | end | |
663 | if block.className=="IntValue" then | |
664 | if block.Value>0 then | |
665 | blocked=true | |
666 | if decreaseblock~=nil then | |
667 | block.Value=block.Value-1 | |
668 | end | |
669 | end | |
670 | end | |
671 | end | |
672 | if blocked==false then | |
673 | -- h:TakeDamage(Damage) | |
674 | h.Health=h.Health-Damage | |
675 | showDamage(hit.Parent,Damage,.5,BrickColor.new("Really red")) | |
676 | else | |
677 | h.Health=h.Health-(Damage/2) | |
678 | showDamage(hit.Parent,Damage/2,.5,BrickColor.new("Bright blue")) | |
679 | end | |
680 | if Type=="Knockdown" then | |
681 | hum=hit.Parent.Humanoid | |
682 | hum.PlatformStand=true | |
683 | coroutine.resume(coroutine.create(function(HHumanoid) | |
684 | swait(1) | |
685 | HHumanoid.PlatformStand=false | |
686 | end),hum) | |
687 | local angle=(hit.Position-(Property.Position+Vector3.new(0,0,0))).unit | |
688 | --hit.CFrame=CFrame.new(hit.Position,Vector3.new(angle.x,hit.Position.y,angle.z))*CFrame.fromEulerAnglesXYZ(math.pi/4,0,0) | |
689 | local bodvol=Instance.new("BodyVelocity") | |
690 | bodvol.velocity=angle*knockback | |
691 | bodvol.P=5000 | |
692 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
693 | bodvol.Parent=hit | |
694 | rl=Instance.new("BodyAngularVelocity") | |
695 | rl.P=3000 | |
696 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
697 | rl.angularvelocity=Vector3.new(math.random(-10,10),math.random(-10,10),math.random(-10,10)) | |
698 | rl.Parent=hit | |
699 | game:GetService("Debris"):AddItem(bodvol,.5) | |
700 | game:GetService("Debris"):AddItem(rl,.5) | |
701 | elseif Type=="Normal" then | |
702 | vp=Instance.new("BodyVelocity") | |
703 | vp.P=500 | |
704 | vp.maxForce=Vector3.new(math.huge,0,math.huge) | |
705 | -- vp.velocity=Character.Torso.CFrame.lookVector*Knockback | |
706 | if KnockbackType==1 then | |
707 | vp.velocity=Property.CFrame.lookVector*knockback+Property.Velocity/1.05 | |
708 | elseif KnockbackType==2 then | |
709 | vp.velocity=Property.CFrame.lookVector*knockback | |
710 | end | |
711 | if knockback>0 then | |
712 | vp.Parent=hit.Parent.Torso | |
713 | end | |
714 | game:GetService("Debris"):AddItem(vp,.5) | |
715 | elseif Type=="Up" then | |
716 | local bodyVelocity=Instance.new("BodyVelocity") | |
717 | bodyVelocity.velocity=vt(0,60,0) | |
718 | bodyVelocity.P=5000 | |
719 | bodyVelocity.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
720 | bodyVelocity.Parent=hit | |
721 | game:GetService("Debris"):AddItem(bodyVelocity,1) | |
722 | rl=Instance.new("BodyAngularVelocity") | |
723 | rl.P=3000 | |
724 | rl.maxTorque=Vector3.new(500000,500000,500000)*50000000000000 | |
725 | rl.angularvelocity=Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)) | |
726 | rl.Parent=hit | |
727 | game:GetService("Debris"):AddItem(rl,.5) | |
728 | elseif Type=="Snare" then | |
729 | bp=Instance.new("BodyPosition") | |
730 | bp.P=2000 | |
731 | bp.D=100 | |
732 | bp.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
733 | bp.position=hit.Parent.Torso.Position | |
734 | bp.Parent=hit.Parent.Torso | |
735 | game:GetService("Debris"):AddItem(bp,1) | |
736 | elseif Type=="Target" then | |
737 | if Targetting==false then | |
738 | ZTarget=hit.Parent.Torso | |
739 | coroutine.resume(coroutine.create(function(Part) | |
740 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) | |
741 | swait(5) | |
742 | so("http://www.roblox.com/asset/?id=15666462",Part,1,1.5) | |
743 | end),ZTarget) | |
744 | TargHum=ZTarget.Parent:findFirstChild("Humanoid") | |
745 | targetgui=Instance.new("BillboardGui") | |
746 | targetgui.Parent=ZTarget | |
747 | targetgui.Size=UDim2.new(10,100,10,100) | |
748 | targ=Instance.new("ImageLabel") | |
749 | targ.Parent=targetgui | |
750 | targ.BackgroundTransparency=1 | |
751 | targ.Image="rbxassetid://4834067" | |
752 | targ.Size=UDim2.new(1,0,1,0) | |
753 | cam.CameraType="Scriptable" | |
754 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
755 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
756 | workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
757 | Targetting=true | |
758 | RocketTarget=ZTarget | |
759 | for i=1,Property do | |
760 | --while Targetting==true and Humanoid.Health>0 and Character.Parent~=nil do | |
761 | if Humanoid.Health>0 and Character.Parent~=nil and TargHum.Health>0 and TargHum.Parent~=nil and Targetting==true then | |
762 | swait() | |
763 | end | |
764 | --workspace.CurrentCamera.CoordinateFrame=CFrame.new(Head.CFrame.p,Head.CFrame.p+rmdir*100) | |
765 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position) | |
766 | dir=Vector3.new(cam.CoordinateFrame.lookVector.x,0,cam.CoordinateFrame.lookVector.z) | |
767 | cam.CoordinateFrame=CFrame.new(Head.CFrame.p,ZTarget.Position)*cf(0,5,10)*euler(-0.3,0,0) | |
768 | end | |
769 | Targetting=false | |
770 | RocketTarget=nil | |
771 | targetgui.Parent=nil | |
772 | cam.CameraType="Custom" | |
773 | end | |
774 | end | |
775 | debounce=Instance.new("BoolValue") | |
776 | debounce.Name="DebounceHit" | |
777 | debounce.Parent=hit.Parent | |
778 | debounce.Value=true | |
779 | game:GetService("Debris"):AddItem(debounce,Delay) | |
780 | c=Instance.new("ObjectValue") | |
781 | c.Name="creator" | |
782 | c.Value=Player | |
783 | c.Parent=h | |
784 | game:GetService("Debris"):AddItem(c,.5) | |
785 | CRIT=false | |
786 | hitDeb=true | |
787 | AttackPos=6 | |
788 | end | |
789 | end | |
790 | ||
791 | showDamage=function(Char,Dealt,du,Color) | |
792 | m=Instance.new("Model") | |
793 | m.Name=tostring(Dealt) | |
794 | h=Instance.new("Humanoid") | |
795 | h.Health=0 | |
796 | h.MaxHealth=0 | |
797 | h.Parent=m | |
798 | c=Instance.new("Part") | |
799 | c.Transparency=0 | |
800 | c.BrickColor=Color | |
801 | c.Transparency = 1 | |
802 | c.Name="Head" | |
803 | c.TopSurface=0 | |
804 | c.BottomSurface=0 | |
805 | c.formFactor="Plate" | |
806 | c.Size=Vector3.new(1,.4,1) | |
807 | ||
808 | local txt = Instance.new("BillboardGui", c) | |
809 | txt.Adornee = c | |
810 | txt.Name = "_status" | |
811 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
812 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
813 | local text = Instance.new("TextLabel", txt) | |
814 | text.Size = UDim2.new(10, 0, 7, 0) | |
815 | text.FontSize = "Size12" | |
816 | text.TextScaled = true | |
817 | text.TextTransparency = 0.5 | |
818 | text.BackgroundTransparency = 1 | |
819 | text.TextTransparency = 0.5 | |
820 | text.TextStrokeTransparency = 0.5 | |
821 | text.Font = "SciFi" | |
822 | text.TextStrokeColor3 = Color3.new(0,0,0) | |
823 | v=Instance.new("Part") | |
824 | v.Name = "ColorBrick" | |
825 | v.Parent=c | |
826 | v.FormFactor="Symmetric" | |
827 | v.Anchored=true | |
828 | v.CanCollide=false | |
829 | v.BottomSurface="Smooth" | |
830 | v.TopSurface="Smooth" | |
831 | v.Size=Vector3.new(10,5,3) | |
832 | v.Transparency=1 | |
833 | v.CFrame=c.CFrame | |
834 | v.BrickColor=BrickColor.random() | |
835 | v.Transparency=1 | |
836 | text.TextColor3 = t.BrickColor.Color | |
837 | v.Shape="Block" | |
838 | text.Text = tostring(Dealt) | |
839 | ms=Instance.new("CylinderMesh") | |
840 | ms.Scale=Vector3.new(.8,.8,.8) | |
841 | --[[local hitsounds={"199149137","199149186","199149221","199149235","199149269","199149297"} | |
842 | local rndm=math.random(1,#hitsounds) | |
843 | local r=rndm | |
844 | CFuncs["Sound"].Create("http://www.roblox.com/asset/?id="..hitsounds[r],c,1.25,1)]]-- | |
845 | if CRIT==true then | |
846 | ms.Scale=Vector3.new(1,1.25,1) | |
847 | end | |
848 | ms.Parent=c | |
849 | c.Reflectance=0 | |
850 | Instance.new("BodyGyro").Parent=c | |
851 | c.Parent=m | |
852 | if Char:findFirstChild("Head")~=nil then | |
853 | c.CFrame=CFrame.new(Char["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
854 | elseif Char.Parent:findFirstChild("Head")~=nil then | |
855 | c.CFrame=CFrame.new(Char.Parent["Head"].CFrame.p+Vector3.new(0,1.5,0)) | |
856 | end | |
857 | f=Instance.new("BodyPosition") | |
858 | f.P=2000 | |
859 | f.D=100 | |
860 | f.maxForce=Vector3.new(math.huge,math.huge,math.huge) | |
861 | f.position=c.Position+Vector3.new(0,3,0) | |
862 | f.Parent=c | |
863 | game:GetService("Debris"):AddItem(m,.5+du) | |
864 | c.CanCollide=false | |
865 | m.Parent=workspace | |
866 | c.CanCollide=false | |
867 | end | |
868 | ||
869 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
870 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
871 | end | |
872 | ||
873 | function SkullEffect(brickcolor,cframe,x1,y1,z1,delay) | |
874 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
875 | prt.Anchored=true | |
876 | prt.CFrame=cframe | |
877 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1)) | |
878 | --http://www.roblox.com/asset/?id=4770560 | |
879 | game:GetService("Debris"):AddItem(prt,2) | |
880 | CF=prt.CFrame | |
881 | coroutine.resume(coroutine.create(function(Part,Mesh,TehCF) | |
882 | for i=0,1,0.2 do | |
883 | wait() | |
884 | Part.CFrame=CF*cf(0,0,-0.4) | |
885 | end | |
886 | for i=0,1,delay do | |
887 | wait() | |
888 | --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5) | |
889 | Mesh.Scale=Mesh.Scale | |
890 | end | |
891 | for i=0,1,0.1 do | |
892 | wait() | |
893 | Part.Transparency=i | |
894 | end | |
895 | Part.Parent=nil | |
896 | end),prt,msh,CF) | |
897 | end | |
898 | ||
899 | function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
900 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
901 | prt.Anchored=true | |
902 | prt.Material = "Neon" | |
903 | prt.CFrame=cframe | |
904 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
905 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
906 | game:GetService("Debris"):AddItem(prt,5) | |
907 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
908 | for i=0,1,delay do | |
909 | swait() | |
910 | Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
911 | Part.Transparency=i | |
912 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
913 | end | |
914 | Part.Parent=nil | |
915 | end),prt,msh) | |
916 | end | |
917 | ||
918 | function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
919 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
920 | prt.Anchored=true | |
921 | prt.Material = "Neon" | |
922 | prt.CFrame=cframe | |
923 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
924 | game:GetService("Debris"):AddItem(prt,5) | |
925 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
926 | local rtype = rottype | |
927 | for i=0,1,delay do | |
928 | swait() | |
929 | if rtype == 1 then | |
930 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
931 | elseif rtype == 2 then | |
932 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
933 | end | |
934 | Part.Transparency=i | |
935 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
936 | end | |
937 | Part.Parent=nil | |
938 | end),prt,msh) | |
939 | end | |
940 | ||
941 | function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
942 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
943 | prt.Anchored=true | |
944 | prt.CFrame=cframe | |
945 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
946 | msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
947 | game:GetService("Debris"):AddItem(prt,5) | |
948 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
949 | for i=0,1,delay do | |
950 | wait() | |
951 | Part.Transparency=i | |
952 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
953 | end | |
954 | Part.Parent=nil | |
955 | end),prt,msh) | |
956 | end | |
957 | ||
958 | function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
959 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
960 | prt.Anchored=true | |
961 | prt.Material = "Neon" | |
962 | prt.CFrame=cframe | |
963 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
964 | game:GetService("Debris"):AddItem(prt,5) | |
965 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
966 | local rtype = rottype | |
967 | for i=0,1,delay do | |
968 | swait() | |
969 | if rtype == 1 then | |
970 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
971 | elseif rtype == 2 then | |
972 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
973 | end | |
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 MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype) | |
982 | local prt=part(3,char,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
983 | prt.Anchored=true | |
984 | prt.Material = "Neon" | |
985 | prt.CFrame=cframe | |
986 | local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt) | |
987 | local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt) | |
988 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01)) | |
989 | game:GetService("Debris"):AddItem(prt,5) | |
990 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
991 | local rtype = rottype | |
992 | for i=0,1,delay do | |
993 | swait() | |
994 | if rtype == 1 then | |
995 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
996 | elseif rtype == 2 then | |
997 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
998 | end | |
999 | dec.Transparency=i | |
1000 | dec2.Transparency=i | |
1001 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
1002 | end | |
1003 | Part.Parent=nil | |
1004 | end),prt,msh) | |
1005 | end | |
1006 | ||
1007 | function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype) | |
1008 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1009 | prt.Anchored=true | |
1010 | prt.Material = "Neon" | |
1011 | prt.CFrame=cframe | |
1012 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01)) | |
1013 | game:GetService("Debris"):AddItem(prt,5) | |
1014 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1015 | local rtype = rottype | |
1016 | for i=0,1,delay do | |
1017 | swait() | |
1018 | if rtype == 1 then | |
1019 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1020 | elseif rtype == 2 then | |
1021 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1022 | end | |
1023 | prt.Transparency=i | |
1024 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
1025 | end | |
1026 | Part.Parent=nil | |
1027 | end),prt,msh) | |
1028 | end | |
1029 | ||
1030 | function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype) | |
1031 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1032 | prt.Anchored=true | |
1033 | prt.Material = "Neon" | |
1034 | prt.CFrame=cframe | |
1035 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1)) | |
1036 | game:GetService("Debris"):AddItem(prt,5) | |
1037 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1038 | local rtype = rottype | |
1039 | for i=0,1,delay do | |
1040 | swait() | |
1041 | if rtype == 1 then | |
1042 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0) | |
1043 | elseif rtype == 2 then | |
1044 | prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0) | |
1045 | end | |
1046 | prt.Transparency=i | |
1047 | Mesh.Scale=Mesh.Scale+vt(x3,0,z3) | |
1048 | end | |
1049 | Part.Parent=nil | |
1050 | end),prt,msh) | |
1051 | end | |
1052 | ||
1053 | function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype) | |
1054 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1055 | prt.Anchored=true | |
1056 | prt.Material = "Neon" | |
1057 | prt.CFrame=cframe | |
1058 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1059 | game:GetService("Debris"):AddItem(prt,5) | |
1060 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1061 | local rtype = rottype | |
1062 | for i=0,1,delay do | |
1063 | swait() | |
1064 | if rtype == 1 then | |
1065 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1066 | elseif rtype == 2 then | |
1067 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1068 | end | |
1069 | prt.Transparency=i | |
1070 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
1071 | end | |
1072 | Part.Parent=nil | |
1073 | end),prt,msh) | |
1074 | end | |
1075 | ||
1076 | function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay) | |
1077 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1078 | prt.Anchored=false | |
1079 | prt.CFrame=cframe | |
1080 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1081 | local wld=weld(prt,prt,Parent,cframe) | |
1082 | game:GetService("Debris"):AddItem(prt,5) | |
1083 | coroutine.resume(coroutine.create(function(Part,Mesh,Weld) | |
1084 | for i=0,1,delay do | |
1085 | wait() | |
1086 | Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe | |
1087 | --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1088 | Part.Transparency=i | |
1089 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1090 | end | |
1091 | Part.Parent=nil | |
1092 | end),prt,msh,wld) | |
1093 | end | |
1094 | ||
1095 | function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay) | |
1096 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1097 | prt.Anchored=false | |
1098 | prt.CFrame=cframe | |
1099 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1100 | local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0)) | |
1101 | game:GetService("Debris"):AddItem(prt,5) | |
1102 | coroutine.resume(coroutine.create(function(Part,Mesh,Weld) | |
1103 | for i=0,1,delay do | |
1104 | wait() | |
1105 | Weld.C0=euler(i*20,0,0) | |
1106 | --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1107 | Part.Transparency=i | |
1108 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1109 | end | |
1110 | Part.Parent=nil | |
1111 | end),prt,msh,wld) | |
1112 | end | |
1113 | ||
1114 | function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1115 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1116 | prt.Anchored=true | |
1117 | prt.CFrame=cframe | |
1118 | local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1119 | game:GetService("Debris"):AddItem(prt,2) | |
1120 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1121 | for i=0,1,delay do | |
1122 | wait() | |
1123 | Part.CFrame=Part.CFrame | |
1124 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1125 | local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1126 | prt2.Anchored=true | |
1127 | prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1128 | local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5)) | |
1129 | game:GetService("Debris"):AddItem(prt2,2) | |
1130 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1131 | for i=0,1,0.1 do | |
1132 | wait() | |
1133 | Part.CFrame=Part.CFrame*cf(0,0.5,0) | |
1134 | end | |
1135 | Part.Parent=nil | |
1136 | end),prt2,msh2) | |
1137 | end | |
1138 | for i=0,1,delay*2 do | |
1139 | wait() | |
1140 | Part.CFrame=Part.CFrame | |
1141 | Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i) | |
1142 | end | |
1143 | Part.Parent=nil | |
1144 | end),prt,msh) | |
1145 | end | |
1146 | ||
1147 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1148 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1149 | prt.Anchored=true | |
1150 | prt.CFrame=cframe | |
1151 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
1152 | game:GetService("Debris"):AddItem(prt,2) | |
1153 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1154 | for i=0,1,delay do | |
1155 | wait() | |
1156 | Part.CFrame=Part.CFrame | |
1157 | Part.Transparency=i | |
1158 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1159 | end | |
1160 | Part.Parent=nil | |
1161 | end),prt,msh) | |
1162 | end | |
1163 | ||
1164 | function BreakEffect(brickcolor,cframe,x1,y1,z1) | |
1165 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1166 | prt.Anchored=true | |
1167 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1168 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
1169 | game:GetService("Debris"):AddItem(prt,2) | |
1170 | coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb) | |
1171 | CF=Part.CFrame | |
1172 | Numbb=0 | |
1173 | randnumb=math.random()/10 | |
1174 | rand1=math.random()/10 | |
1175 | for i=0,1,rand1 do | |
1176 | wait() | |
1177 | CF=CF*cf(0,math.random()/2,0) | |
1178 | --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0) | |
1179 | Part.CFrame=CF*euler(Numbb,0,0) | |
1180 | Part.Transparency=i | |
1181 | Numbb=Numbb+randnumb | |
1182 | end | |
1183 | Part.Parent=nil | |
1184 | end),prt,CF,Numbb,randnumb) | |
1185 | end | |
1186 | ||
1187 | function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1188 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1189 | prt.Anchored=true | |
1190 | prt.CFrame=cframe | |
1191 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1)) | |
1192 | game:GetService("Debris"):AddItem(prt,5) | |
1193 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1194 | for i=0,1,delay do | |
1195 | wait() | |
1196 | Part.CFrame=Part.CFrame*euler(0,0.7,0) | |
1197 | Part.Transparency=i | |
1198 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1199 | end | |
1200 | Part.Parent=nil | |
1201 | end),prt,msh) | |
1202 | end | |
1203 | ||
1204 | function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1205 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1206 | prt.Anchored=true | |
1207 | prt.CFrame=cframe | |
1208 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1)) | |
1209 | game:GetService("Debris"):AddItem(prt,2) | |
1210 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1211 | for i=0,1,delay do | |
1212 | wait() | |
1213 | Part.CFrame=Part.CFrame*cf(0,y3/2,0) | |
1214 | Part.Transparency=i | |
1215 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1216 | end | |
1217 | Part.Parent=nil | |
1218 | end),prt,msh) | |
1219 | end | |
1220 | ||
1221 | function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay) | |
1222 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1223 | prt.Anchored=true | |
1224 | prt.CFrame=cframe*cf(x,y,z) | |
1225 | msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1)) | |
1226 | game:GetService("Debris"):AddItem(prt,5) | |
1227 | coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee) | |
1228 | local num=math.random() | |
1229 | local num2=math.random(-3,2)+math.random() | |
1230 | local numm=0 | |
1231 | for i=0,1,delay*2 do | |
1232 | swait() | |
1233 | Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0) | |
1234 | Part.Transparency=i | |
1235 | numm=numm+0.01 | |
1236 | end | |
1237 | Part.Parent=nil | |
1238 | Mesh.Parent=nil | |
1239 | end),prt,msh,x,y,z) | |
1240 | end | |
1241 | ||
1242 | function dmgstart(dmg,what) | |
1243 | hitcon = what.Touched:connect(function(hit) | |
1244 | local hum = hit.Parent:FindFirstChild("Humanoid") | |
1245 | if hum and not hum:IsDescendantOf(Character) then | |
1246 | hum:TakeDamage(dmg) | |
1247 | end | |
1248 | end) | |
1249 | end | |
1250 | ||
1251 | function dmgstop() | |
1252 | hitcon:disconnect() | |
1253 | end | |
1254 | ||
1255 | function Cloak() | |
1256 | Face.Parent=nil | |
1257 | cloaked=true | |
1258 | for _,v in pairs(Torso.Parent:children()) do | |
1259 | if v.className=="Part" and v.Name~="HumanoidRootPart" then | |
1260 | coroutine.resume(coroutine.create(function() | |
1261 | for i=0,1,0.2 do | |
1262 | wait() | |
1263 | v.Transparency=i | |
1264 | end | |
1265 | v.Transparency=1 | |
1266 | end)) | |
1267 | end | |
1268 | if v.className=="Hat" then | |
1269 | hatp=v.Handle | |
1270 | coroutine.resume(coroutine.create(function(derp) | |
1271 | for i=0,1,0.2 do | |
1272 | wait() | |
1273 | derp.Transparency=i | |
1274 | end | |
1275 | derp.Transparency=1 | |
1276 | end),hatp) | |
1277 | end | |
1278 | end | |
1279 | for _,v in pairs(m:children()) do | |
1280 | if v.className=="Part" then | |
1281 | coroutine.resume(coroutine.create(function() | |
1282 | for i=0,1,0.2 do | |
1283 | wait() | |
1284 | v.Transparency=i | |
1285 | end | |
1286 | v.Transparency=1 | |
1287 | end)) | |
1288 | end | |
1289 | end | |
1290 | end | |
1291 | ||
1292 | function UnCloak() | |
1293 | so("http://roblox.com/asset/?id=2767090",Torso,1,1.1) | |
1294 | Face.Parent=Head | |
1295 | cloaked=false | |
1296 | for _,v in pairs(Torso.Parent:children()) do | |
1297 | if v.className=="Part" and v.Name~="HumanoidRootPart" then | |
1298 | coroutine.resume(coroutine.create(function() | |
1299 | for i=0,1,0.1 do | |
1300 | wait() | |
1301 | v.Transparency=v.Transparency-0.1 | |
1302 | end | |
1303 | v.Transparency=0 | |
1304 | end)) | |
1305 | end | |
1306 | if v.className=="Hat" then | |
1307 | hatp=v.Handle | |
1308 | coroutine.resume(coroutine.create(function(derp) | |
1309 | for i=0,1,0.1 do | |
1310 | wait() | |
1311 | derp.Transparency=derp.Transparency-0.1 | |
1312 | end | |
1313 | derp.Transparency=0 | |
1314 | end),hatp) | |
1315 | end | |
1316 | end | |
1317 | for _,v in pairs(m:children()) do | |
1318 | if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' then | |
1319 | coroutine.resume(coroutine.create(function() | |
1320 | for i=0,1,0.1 do | |
1321 | wait() | |
1322 | v.Transparency=v.Transparency-0.1 | |
1323 | end | |
1324 | v.Transparency=0 | |
1325 | end)) | |
1326 | v.Transparency=0 | |
1327 | end | |
1328 | end | |
1329 | end | |
1330 | ||
1331 | local jumped = false | |
1332 | function jump() | |
1333 | attack = true | |
1334 | jumped = true | |
1335 | hum.WalkSpeed = 0 | |
1336 | MagicBlock(bc("White"),root.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015) | |
1337 | CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1) | |
1338 | CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7) | |
1339 | for i = 0,15,0.1 do | |
1340 | swait() | |
1341 | MagicBlock(bc("White"),sorb2.CFrame,3,3,3,0.05,0.05,0.05,0.05) | |
1342 | MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05) | |
1343 | RH.C0=clerp(RH.C0,cf(1,0.45,-0.75)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(50)),.05) | |
1344 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(15)),.05) | |
1345 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1.5)* angles(math.rad(50),math.rad(0),math.rad(0)),0.05) | |
1346 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(0)),.05) | |
1347 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05) | |
1348 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-20)), 0.05) | |
1349 | end | |
1350 | local bv = Instance.new("BodyVelocity") | |
1351 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1352 | bv.velocity = Vector3.new(0,500,0) | |
1353 | bv.Parent = root | |
1354 | game:GetService("Debris"):AddItem(bv, 0.5) | |
1355 | local rng = Instance.new("Part", char) | |
1356 | rng.Anchored = true | |
1357 | rng.BrickColor = BrickColor.new("White") | |
1358 | rng.CanCollide = false | |
1359 | rng.FormFactor = 3 | |
1360 | rng.Name = "Ring" | |
1361 | rng.Size = Vector3.new(1, 1, 1) | |
1362 | rng.Transparency = 0 | |
1363 | rng.TopSurface = 0 | |
1364 | rng.BottomSurface = 0 | |
1365 | rng.Position = root.Position | |
1366 | rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) | |
1367 | local rngm = Instance.new("SpecialMesh", rng) | |
1368 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
1369 | local rng2 = rng:Clone() | |
1370 | rng2.Parent = char | |
1371 | local rng2m = rng2.Mesh | |
1372 | local rng3 = rng:Clone() | |
1373 | rng3.Parent = char | |
1374 | local rng3m = rng3.Mesh | |
1375 | local rng4 = rng:Clone() | |
1376 | rng4.Parent = char | |
1377 | local rng4m = rng4.Mesh | |
1378 | local rng5 = rng:Clone() | |
1379 | rng5.Parent = char | |
1380 | local rng5m = rng5.Mesh | |
1381 | CFuncs["Sound"].Create("rbxassetid://324867021", rng, 10, 1) | |
1382 | wait() | |
1383 | local scaler = 10 | |
1384 | local scaler2 = 10 | |
1385 | game:GetService("Debris"):AddItem(bv, 2.4) | |
1386 | hum.WalkSpeed = 50 | |
1387 | MagicBlock(bc("White"),root.CFrame,15,15,15,10,10,10,0.015) | |
1388 | for i = 0,10,0.1 do | |
1389 | swait() | |
1390 | rng.Transparency = rng.Transparency + 0.01 | |
1391 | rng2.Transparency = rng2.Transparency + 0.01 | |
1392 | rng3.Transparency = rng3.Transparency + 0.01 | |
1393 | rng4.Transparency = rng4.Transparency + 0.01 | |
1394 | rng5.Transparency = rng5.Transparency + 0.01 | |
1395 | scaler = scaler - 0.125 | |
1396 | scaler2 = scaler2 - 0.1 | |
1397 | rng2m.Scale = rng2m.Scale + Vector3.new(scaler/1.25, scaler/1.25, 20) | |
1398 | rng3m.Scale = rng3m.Scale + Vector3.new(scaler/1.5, scaler/1.5, 30) | |
1399 | rng4m.Scale = rng4m.Scale + Vector3.new(scaler/1.75, scaler/1.75, 40) | |
1400 | rng5m.Scale = rng5m.Scale + Vector3.new(scaler/2, scaler/2, 50) | |
1401 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0) | |
1402 | RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),.5) | |
1403 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),.5) | |
1404 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-5),math.rad(0),math.rad(0)),0.5) | |
1405 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-5),math.rad(0),math.rad(0)),.5) | |
1406 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), 0.5) | |
1407 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), 0.5) | |
1408 | end | |
1409 | game:GetService("Debris"):AddItem(rng, 0.1) | |
1410 | game:GetService("Debris"):AddItem(rng2, 0.1) | |
1411 | game:GetService("Debris"):AddItem(rng3, 0.1) | |
1412 | game:GetService("Debris"):AddItem(rng4, 0.1) | |
1413 | game:GetService("Debris"):AddItem(rng5, 0.1) | |
1414 | hum.WalkSpeed = 16 | |
1415 | attack = false | |
1416 | jumped = false | |
1417 | end | |
1418 | ||
1419 | function dash() | |
1420 | attack = true | |
1421 | jumped = true | |
1422 | hum.WalkSpeed = 0 | |
1423 | local bv = Instance.new("BodyVelocity") | |
1424 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1425 | bv.velocity = root.CFrame.lookVector*150 | |
1426 | bv.Parent = root | |
1427 | game:GetService("Debris"):AddItem(bv, 1) | |
1428 | local rng = Instance.new("Part", char) | |
1429 | rng.Anchored = true | |
1430 | rng.BrickColor = BrickColor.new("White") | |
1431 | rng.CanCollide = false | |
1432 | rng.FormFactor = 3 | |
1433 | rng.Name = "Ring" | |
1434 | rng.Size = Vector3.new(1, 1, 1) | |
1435 | rng.Transparency = 0 | |
1436 | rng.TopSurface = 0 | |
1437 | rng.BottomSurface = 0 | |
1438 | rng.CFrame = root.CFrame | |
1439 | local rngm = Instance.new("SpecialMesh", rng) | |
1440 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
1441 | local rng2 = rng:Clone() | |
1442 | rng2.Parent = char | |
1443 | rng2.CFrame = root.CFrame + root.CFrame.lookVector*10 | |
1444 | local rng2m = rng2.Mesh | |
1445 | local rng3 = rng:Clone() | |
1446 | rng3.Parent = char | |
1447 | rng3.CFrame = root.CFrame + root.CFrame.lookVector*20 | |
1448 | local rng3m = rng3.Mesh | |
1449 | local rng4 = rng:Clone() | |
1450 | rng4.Parent = char | |
1451 | rng4.CFrame = root.CFrame + root.CFrame.lookVector*30 | |
1452 | local rng4m = rng4.Mesh | |
1453 | local rng5 = rng:Clone() | |
1454 | rng5.Parent = char | |
1455 | rng5.CFrame = root.CFrame + root.CFrame.lookVector*40 | |
1456 | local rng5m = rng5.Mesh | |
1457 | CFuncs["Sound"].Create("rbxassetid://324867021", root, 1, 1) | |
1458 | wait() | |
1459 | local scaler = 10/5 | |
1460 | local scaler2 = 10/5 | |
1461 | local hit = larm.Touched:connect(function(hit) | |
1462 | Damagefunc(hit,25,34,math.random(10,20),"Normal",root,.2,1) | |
1463 | end) | |
1464 | for i = 0,10,0.1 do | |
1465 | swait() | |
1466 | MagicBlock(bc("White"),sorb2.CFrame,3,3,3,0.05,0.05,0.05,0.05) | |
1467 | rng.Transparency = rng.Transparency + 0.01 | |
1468 | rng2.Transparency = rng2.Transparency + 0.01 | |
1469 | rng3.Transparency = rng3.Transparency + 0.01 | |
1470 | rng4.Transparency = rng4.Transparency + 0.01 | |
1471 | rng5.Transparency = rng5.Transparency + 0.01 | |
1472 | scaler = scaler - 0.125/5 | |
1473 | scaler2 = scaler2 - 0.1/5 | |
1474 | rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.25, scaler2/1.25, 0) | |
1475 | rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0) | |
1476 | rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.75, scaler2/1.75, 0) | |
1477 | rng5m.Scale = rng5m.Scale + Vector3.new(scaler2/2, scaler2/2, 0) | |
1478 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0) | |
1479 | RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-25)),.5) | |
1480 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(5)),.5) | |
1481 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(-80)),0.5) | |
1482 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.5) | |
1483 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), 0.5) | |
1484 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-110)), 0.5) | |
1485 | end | |
1486 | game:GetService("Debris"):AddItem(rng, 0.1) | |
1487 | game:GetService("Debris"):AddItem(rng2, 0.1) | |
1488 | game:GetService("Debris"):AddItem(rng3, 0.1) | |
1489 | game:GetService("Debris"):AddItem(rng4, 0.1) | |
1490 | game:GetService("Debris"):AddItem(rng5, 0.1) | |
1491 | hum.WalkSpeed = 16 | |
1492 | hit:disconnect() | |
1493 | attack = false | |
1494 | jumped = false | |
1495 | end | |
1496 | ||
1497 | function boom() | |
1498 | attack = true | |
1499 | jumped = true | |
1500 | hum.WalkSpeed = 0 | |
1501 | MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015) | |
1502 | CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1) | |
1503 | CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7) | |
1504 | for i = 0,15,0.1 do | |
1505 | swait() | |
1506 | MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05) | |
1507 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05) | |
1508 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05) | |
1509 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05) | |
1510 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05) | |
1511 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05) | |
1512 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05) | |
1513 | end | |
1514 | local rng = Instance.new("Part", char) | |
1515 | rng.Anchored = true | |
1516 | rng.BrickColor = BrickColor.new("White") | |
1517 | rng.CanCollide = false | |
1518 | rng.FormFactor = 3 | |
1519 | rng.Name = "Ring" | |
1520 | rng.Size = Vector3.new(1, 1, 1) | |
1521 | rng.Transparency = 0 | |
1522 | rng.TopSurface = 0 | |
1523 | rng.BottomSurface = 0 | |
1524 | rng.Position = root.Position | |
1525 | rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(90), math.rad(0), math.rad(0)) | |
1526 | - | (mouse.Hit.p - root.CFrame.p).unit * 500 -- direction |
1526 | + | |
1527 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
1528 | local rng2 = rng:Clone() | |
1529 | rng2.Parent = char | |
1530 | local rng2m = rng2.Mesh | |
1531 | local rng3 = rng:Clone() | |
1532 | rng3.Parent = char | |
1533 | local rng3m = rng3.Mesh | |
1534 | local rng4 = rng:Clone() | |
1535 | rng4.Parent = char | |
1536 | local rng4m = rng4.Mesh | |
1537 | local rng5 = rng:Clone() | |
1538 | rng5.Parent = char | |
1539 | local rng5m = rng5.Mesh | |
1540 | local hit = rng5.Touched:connect(function(hit) | |
1541 | Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1) | |
1542 | end) | |
1543 | MagicBlock(bc("White"),root.CFrame,15,15,15,5,5,5,0.015) | |
1544 | CFuncs["Sound"].Create("rbxassetid://187137517", rng, 10, 1) | |
1545 | CFuncs["Sound"].Create("rbxassetid://597291504", rng, 5, 0.85) | |
1546 | CFuncs["Sound"].Create("rbxassetid://144699494", rng, 10, 1) | |
1547 | wait() | |
1548 | local scaler = 10 | |
1549 | local scaler2 = 10 | |
1550 | for i = 0,10,0.1 do | |
1551 | swait() | |
1552 | rng.Transparency = rng.Transparency + 0.01 | |
1553 | rng2.Transparency = rng2.Transparency + 0.01 | |
1554 | rng3.Transparency = rng3.Transparency + 0.01 | |
1555 | rng4.Transparency = rng4.Transparency + 0.01 | |
1556 | rng5.Transparency = rng5.Transparency + 0.01 | |
1557 | scaler = scaler - 0.125 | |
1558 | scaler2 = scaler2 - 0.1 | |
1559 | rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.75, scaler2/1.75, 4) | |
1560 | rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 3) | |
1561 | rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.25, scaler2/1.25, 2) | |
1562 | rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 1) | |
1563 | rng5.Size = rng5m.Scale | |
1564 | rng5.CFrame = rng.CFrame | |
1565 | rngm.Scale = rngm.Scale + Vector3.new(scaler2/2, scaler2/2, 5) | |
1566 | RH.C0=clerp(RH.C0,cf(1,-0.25,-0.5)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-30),math.rad(0),math.rad(0)),.5) | |
1567 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.5) | |
1568 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-1)* angles(math.rad(30),math.rad(0),math.rad(80)),0.5) | |
1569 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5) | |
1570 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(40)), 0.5) | |
1571 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-50)), 0.5) | |
1572 | end | |
1573 | hit:disconnect() | |
1574 | game:GetService("Debris"):AddItem(rng, 1) | |
1575 | game:GetService("Debris"):AddItem(rng2, 1) | |
1576 | game:GetService("Debris"):AddItem(rng3, 1) | |
1577 | game:GetService("Debris"):AddItem(rng4, 1) | |
1578 | game:GetService("Debris"):AddItem(rng5, 1) | |
1579 | hum.WalkSpeed = 16 | |
1580 | attack = false | |
1581 | jumped = false | |
1582 | end | |
1583 | ||
1584 | function shooty() | |
1585 | attack = true | |
1586 | MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015) | |
1587 | CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1) | |
1588 | CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7) | |
1589 | for i = 0,15,0.1 do | |
1590 | swait() | |
1591 | MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05) | |
1592 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05) | |
1593 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05) | |
1594 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.05) | |
1595 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05) | |
1596 | end | |
1597 | CFuncs["Sound"].Create("rbxassetid://187137517", root, 1, 1) | |
1598 | local a = Instance.new("Part",Character) | |
1599 | a.Name = "Direction" | |
1600 | a.Anchored = true | |
1601 | a.BrickColor = bc("Bright red") | |
1602 | a.Material = "Neon" | |
1603 | a.Transparency = 1 | |
1604 | a.CanCollide = false | |
1605 | local ray = Ray.new( | |
1606 | root.CFrame.p, -- origin | |
1607 | (Mouse.Hit.p - root.CFrame.p).unit * 500 -- direction | |
1608 | ) | |
1609 | local ignore = Character | |
1610 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1611 | a.BottomSurface = 10 | |
1612 | a.TopSurface = 10 | |
1613 | local distance = (root.CFrame.p - position).magnitude | |
1614 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
1615 | a.CFrame = CFrame.new(root.CFrame.p, position) * CFrame.new(0, 0, 0) | |
1616 | local lb = Instance.new("Part") | |
1617 | lb.Parent = char | |
1618 | lb.BrickColor = bc("White") | |
1619 | lb.CanCollide = false | |
1620 | lb.Material = "Neon" | |
1621 | lb.Anchored = true | |
1622 | lb.TopSurface = 0 | |
1623 | lb.BottomSurface = 0 | |
1624 | lb.Transparency = 0 | |
1625 | lb.Size = vt(0.5,0.5,0.5) | |
1626 | lb.CFrame = sorb.CFrame | |
1627 | lb.Anchored = false | |
1628 | local thingery = Instance.new("SpecialMesh",lb) | |
1629 | thingery.MeshType = "Sphere" | |
1630 | thingery.Scale = vt(25,25,25) | |
1631 | game:GetService("Debris"):AddItem(lb, 10) | |
1632 | local bv = Instance.new("BodyVelocity") | |
1633 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
1634 | bv.velocity = a.CFrame.lookVector*150 | |
1635 | bv.Parent = lb | |
1636 | game:GetService("Debris"):AddItem(a, 0.1) | |
1637 | wait(0.05) | |
1638 | local hitted = false | |
1639 | lb.Touched:connect(function(hit) | |
1640 | if hitted == false then | |
1641 | hitted = true | |
1642 | lb.Anchored = true | |
1643 | lb.Transparency = 1 | |
1644 | local rng = Instance.new("Part", char) | |
1645 | rng.Anchored = true | |
1646 | rng.BrickColor = BrickColor.new("White") | |
1647 | rng.CanCollide = false | |
1648 | rng.FormFactor = 3 | |
1649 | rng.Name = "Ring" | |
1650 | rng.Size = Vector3.new(1, 1, 1) | |
1651 | rng.Transparency = 0 | |
1652 | rng.TopSurface = 0 | |
1653 | rng.BottomSurface = 0 | |
1654 | rng.CFrame = lb.CFrame | |
1655 | rng.CFrame = rng.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360))) | |
1656 | local rngm = Instance.new("SpecialMesh", rng) | |
1657 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
1658 | local rng2 = rng:Clone() | |
1659 | rng2.Parent = char | |
1660 | local rng2m = rng2.Mesh | |
1661 | local rng3 = rng:Clone() | |
1662 | rng3.Parent = char | |
1663 | local rng3m = rng3.Mesh | |
1664 | local rng4 = rng:Clone() | |
1665 | rng4.Parent = char | |
1666 | local rng4m = rng4.Mesh | |
1667 | local rng5 = rng:Clone() | |
1668 | rng5.Parent = char | |
1669 | rng5.CFrame = rng5.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360))) | |
1670 | local rng5m = rng5.Mesh | |
1671 | rng2.CFrame = rng2.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360))) | |
1672 | rng3.CFrame = rng3.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360))) | |
1673 | rng4.CFrame = rng4.CFrame * CFrame.Angles(math.rad(math.random(-360,360)), math.rad(math.random(-360,360)), math.rad(math.random(-360,360))) | |
1674 | MagicBlock(bc("White"),lb.CFrame,15,15,15,5,5,5,0.015) | |
1675 | local rng6 = rng:Clone() | |
1676 | rng6.Material = "Neon" | |
1677 | rng6.Parent = char | |
1678 | local rng6m = rng6.Mesh | |
1679 | rng6m.Scale = vt(1,1,1) | |
1680 | rng6m.MeshType = "Sphere" | |
1681 | local hita = rng6.Touched:connect(function(hit) | |
1682 | Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1) | |
1683 | end) | |
1684 | CFuncs["Sound"].Create("rbxassetid://187137517", rng, 5, 1) | |
1685 | CFuncs["Sound"].Create("rbxassetid://597291504", rng, 5, 0.75) | |
1686 | CFuncs["Sound"].Create("rbxassetid://144699494", rng, 5, 1) | |
1687 | local scaler = 5 | |
1688 | local scaler2 = 5 | |
1689 | for i = 0,20,0.1 do | |
1690 | swait() | |
1691 | rng.Transparency = rng.Transparency + 0.005 | |
1692 | rng2.Transparency = rng2.Transparency + 0.005 | |
1693 | rng3.Transparency = rng3.Transparency + 0.005 | |
1694 | rng4.Transparency = rng4.Transparency + 0.005 | |
1695 | rng5.Transparency = rng5.Transparency + 0.005 | |
1696 | rng6.Transparency = rng6.Transparency + 0.005 | |
1697 | scaler = scaler - 0.005/2 | |
1698 | scaler2 = scaler2 - 0.05/2 | |
1699 | rng6.Size = rng6.Size + Vector3.new(scaler2/3, scaler2/3, scaler2/3) | |
1700 | rng6.CFrame = rng.CFrame | |
1701 | rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0) | |
1702 | rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0) | |
1703 | rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/2, scaler2/2, 0) | |
1704 | rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 0) | |
1705 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0) | |
1706 | end | |
1707 | hita:disconnect() | |
1708 | game:GetService("Debris"):AddItem(rng, 1) | |
1709 | game:GetService("Debris"):AddItem(rng2, 1) | |
1710 | game:GetService("Debris"):AddItem(rng3, 1) | |
1711 | game:GetService("Debris"):AddItem(rng4, 1) | |
1712 | game:GetService("Debris"):AddItem(rng5, 1) | |
1713 | game:GetService("Debris"):AddItem(rng6, 1) | |
1714 | end | |
1715 | end) | |
1716 | for i = 0,2,0.1 do | |
1717 | swait() | |
1718 | MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05) | |
1719 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(80)),0.5) | |
1720 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5) | |
1721 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.5) | |
1722 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.5) | |
1723 | end | |
1724 | attack = false | |
1725 | end | |
1726 | ||
1727 | function superpunch() | |
1728 | attack = true | |
1729 | jumped = true | |
1730 | hum.WalkSpeed = 0 | |
1731 | MagicBlock(bc("White"),sorb.CFrame,15,15,15,-0.25,-0.25,-0.25,0.015) | |
1732 | CFuncs["Sound"].Create("rbxassetid://169445572", root, 1, 1) | |
1733 | CFuncs["Sound"].Create("rbxassetid://169380495", root, 1, 0.7) | |
1734 | for i = 0,15,0.1 do | |
1735 | swait() | |
1736 | MagicBlock(bc("White"),sorb.CFrame,3,3,3,0.05,0.05,0.05,0.05) | |
1737 | RH.C0=clerp(RH.C0,cf(1,-1,0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05) | |
1738 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.05) | |
1739 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-80)),0.05) | |
1740 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(80)),.05) | |
1741 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-20)), 0.05) | |
1742 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.05) | |
1743 | end | |
1744 | local rng = Instance.new("Part", char) | |
1745 | rng.Anchored = true | |
1746 | rng.BrickColor = BrickColor.new("White") | |
1747 | rng.CanCollide = false | |
1748 | rng.FormFactor = 3 | |
1749 | rng.Name = "Ring" | |
1750 | rng.Size = Vector3.new(1, 1, 1) | |
1751 | - | mouse.KeyDown:connect(function(k) |
1751 | + | |
1752 | rng.TopSurface = 0 | |
1753 | rng.BottomSurface = 0 | |
1754 | rng.CFrame = root.CFrame | |
1755 | local rngm = Instance.new("SpecialMesh", rng) | |
1756 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
1757 | local rng2 = rng:Clone() | |
1758 | - | if k == "c" and attack == false and RootPart.Velocity.y == 0 and hitfloor~=nil then |
1758 | + | |
1759 | - | boom() |
1759 | + | |
1760 | local rng3 = rng:Clone() | |
1761 | - | if k == "v" and attack == false then |
1761 | + | |
1762 | local rng3m = rng3.Mesh | |
1763 | local rng4 = rng:Clone() | |
1764 | - | if k == "b" and attack == false then |
1764 | + | |
1765 | - | superpunch() |
1765 | + | |
1766 | local rng5 = rng:Clone() | |
1767 | rng5.Parent = char | |
1768 | local rng5m = rng5.Mesh | |
1769 | local rng6 = rng:Clone() | |
1770 | rng6.Material = "Neon" | |
1771 | rng6.Parent = char | |
1772 | local rng6m = rng6.Mesh | |
1773 | rng6m.Scale = vt(1,1,1) | |
1774 | rng6m.MeshType = "Sphere" | |
1775 | local hita = rng6.Touched:connect(function(hit) | |
1776 | Damagefunc(hit,10,25,math.random(10,20),"Normal",root,.2,1) | |
1777 | end) | |
1778 | rng2.CFrame = root.CFrame | |
1779 | rng3.CFrame = root.CFrame | |
1780 | rng4.CFrame = root.CFrame | |
1781 | rng5.CFrame = root.CFrame | |
1782 | rng6.CFrame = root.CFrame | |
1783 | CFuncs["Sound"].Create("rbxassetid://260430117", rng, 5, 1) | |
1784 | CFuncs["Sound"].Create("rbxassetid://187137517", rng, 5, 0.85) | |
1785 | CFuncs["Sound"].Create("rbxassetid://169628396", rng, 5, 1) | |
1786 | CFuncs["Sound"].Create("rbxassetid://137994058", rng, 5, 1) | |
1787 | CFuncs["Sound"].Create("rbxassetid://138186576", rng, 5, 1) | |
1788 | wait() | |
1789 | local scaler = 10/5 | |
1790 | local scaler2 = 10/5 | |
1791 | MagicBlock(bc("White"),root.CFrame,15,15,15,5,5,5,0.015) | |
1792 | for i = 0,10,0.1 do | |
1793 | swait() | |
1794 | MagicBlock(bc("White"),rng6.CFrame,5,5,5,5,5,5,0.1) | |
1795 | rng.CFrame = rng.CFrame + rng.CFrame.lookVector*scaler2 | |
1796 | rng2.CFrame = rng2.CFrame + rng2.CFrame.lookVector*scaler2/1.25 | |
1797 | rng3.CFrame = rng3.CFrame + rng3.CFrame.lookVector*scaler2/1.5 | |
1798 | rng4.CFrame = rng4.CFrame + rng4.CFrame.lookVector*scaler2/1.75 | |
1799 | rng5.CFrame = rng5.CFrame + rng5.CFrame.lookVector*scaler2/2 | |
1800 | rng6.Size = rng6.Size + Vector3.new(scaler2/3, scaler2/3, scaler2/3) | |
1801 | rng6.CFrame = rng.CFrame | |
1802 | rng.Transparency = rng.Transparency + 0.01 | |
1803 | rng2.Transparency = rng2.Transparency + 0.01 | |
1804 | rng3.Transparency = rng3.Transparency + 0.01 | |
1805 | rng4.Transparency = rng4.Transparency + 0.01 | |
1806 | rng5.Transparency = rng5.Transparency + 0.01 | |
1807 | rng6.Transparency = rng6.Transparency + 0.01 | |
1808 | scaler = scaler - 0.125/5 | |
1809 | scaler2 = scaler2 - 0.1/5 | |
1810 | rng2m.Scale = rng2m.Scale + Vector3.new(scaler2/2.5, scaler2/2.5, 1.5) | |
1811 | rng3m.Scale = rng3m.Scale + Vector3.new(scaler2/2, scaler2/2, 1) | |
1812 | rng4m.Scale = rng4m.Scale + Vector3.new(scaler2/1.5, scaler2/1.5, 0.5) | |
1813 | rng5m.Scale = rng5m.Scale + Vector3.new(scaler2, scaler2, 0) | |
1814 | rngm.Scale = rngm.Scale + Vector3.new(scaler2/3, scaler2/3, 2) | |
1815 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(80)),0.5) | |
1816 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(5),math.rad(0),math.rad(-80)),.5) | |
1817 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(20)), 0.5) | |
1818 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(50), math.rad(0), math.rad(-90)), 0.5) | |
1819 | end | |
1820 | hita:disconnect() | |
1821 | game:GetService("Debris"):AddItem(rng, 1) | |
1822 | game:GetService("Debris"):AddItem(rng2, 1) | |
1823 | game:GetService("Debris"):AddItem(rng3, 1) | |
1824 | game:GetService("Debris"):AddItem(rng4, 1) | |
1825 | game:GetService("Debris"):AddItem(rng5, 1) | |
1826 | hum.WalkSpeed = 16 | |
1827 | attack = false | |
1828 | jumped = false | |
1829 | end | |
1830 | ||
1831 | ||
1832 | Mouse.KeyDown:connect(function(k) | |
1833 | if k == "z" and attack == false and RootPart.Velocity.y == 0 and hitfloor~=nil then | |
1834 | jump() | |
1835 | end | |
1836 | if k == "x" and attack == false then | |
1837 | dash() | |
1838 | end | |
1839 | if k == "c" and attack == false then | |
1840 | shooty() | |
1841 | end | |
1842 | end) | |
1843 | Humanoid.Animator.Parent = nil | |
1844 | idleanim=.4 | |
1845 | while true do | |
1846 | swait() | |
1847 | sine = sine + change | |
1848 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
1849 | local velderp=RootPart.Velocity.y | |
1850 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
1851 | if equipped==true or equipped==false then | |
1852 | if attack==false then | |
1853 | idle=idle+1 | |
1854 | else | |
1855 | idle=0 | |
1856 | end | |
1857 | if idle>=500 then | |
1858 | if attack==false then | |
1859 | --Sheath() | |
1860 | end | |
1861 | end | |
1862 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
1863 | Anim="Jump" | |
1864 | if attack==false then | |
1865 | Neck.C0=clerp(Neck.C0,necko*euler(-0.2,0,0),.3) | |
1866 | Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3) | |
1867 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1868 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(-.5,0,0.5)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3) | |
1869 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
1870 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(-.5,0,-0.5),.3) | |
1871 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
1872 | RH.C0=clerp(RH.C0,cf(1,-1,-.3)*euler(-0.5,1.57,0)*euler(-.2,0,0),.2) | |
1873 | LH.C0=clerp(LH.C0,cf(-1,-1,-.3)*euler(-0.5,-1.57,0)*euler(-.2,0,0),.2) | |
1874 | end | |
1875 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
1876 | Anim="Fall" | |
1877 | if attack==false then | |
1878 | Neck.C0=clerp(Neck.C0,necko*euler(0.4,0,0),.3) | |
1879 | Neck.C1=clerp(Neck.C1,necko2*euler(0,0,0),.3) | |
1880 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0.25)*angles(math.rad(5),math.rad(0),math.rad(0)),.3) | |
1881 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*euler(0.3,0,-0.2),.3) | |
1882 | LW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
1883 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*euler(0.3,0,0.2)*angles(math.rad(-25),math.rad(0),math.rad(0)),.3) | |
1884 | RW.C1=clerp(LW.C1,cf(0,0.5,0)*euler(0,0,0),.3) | |
1885 | RH.C0=clerp(RH.C0,cf(1,-1,0)*euler(0.4,1.57,0),.2) | |
1886 | LH.C0=clerp(LH.C0,cf(-1,-1,0)*euler(-0.2,-1.57,0),.2) | |
1887 | end | |
1888 | elseif torvel<1 and hitfloor~=nil then | |
1889 | Anim="Idle" | |
1890 | if jumped == false then | |
1891 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3) | |
1892 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.15 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5 - 2.5 * math.cos(sine / 32)),math.rad(0),math.rad(0 + 7.5 * math.cos(sine / 32))),.3) | |
1893 | end | |
1894 | if attack==false then | |
1895 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.15 * math.cos(sine / 25))*angles(math.rad(0),math.rad(0),math.rad(0)),.3) | |
1896 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0 - 5 * math.cos(sine / 25)),math.rad(0),math.rad(0)),.3) | |
1897 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(5 + 2.5 * math.cos(sine / 25))),.3) | |
1898 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0),math.rad(0),math.rad(-5 - 2.5 * math.cos(sine / 25))),.3) | |
1899 | end | |
1900 | elseif torvel>2 and torvel<22 and hitfloor~=nil then | |
1901 | Anim="Walk" | |
1902 | if jumped == false then | |
1903 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3) | |
1904 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 4),-0.25 - 0.15 * math.cos(sine / 4))*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 25 * math.cos(sine / 8))),.3) | |
1905 | end | |
1906 | if attack==false then | |
1907 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 - 0.05 * math.cos(sine / 4))*angles(math.rad(15),math.rad(0),math.rad(0)),.3) | |
1908 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1909 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(0 - 25 * math.cos(sine / 8)),math.rad(0),math.rad(10 + 1.25 * math.cos(sine / 16))),.3) | |
1910 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(0 + 25 * math.cos(sine / 8)),math.rad(0),math.rad(-10 - 1.25 * math.cos(sine / 16))),.3) | |
1911 | end | |
1912 | elseif torvel>=22 and hitfloor~=nil then | |
1913 | Anim="Run" | |
1914 | if jumped == false then | |
1915 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3) | |
1916 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3) | |
1917 | end | |
1918 | if attack==false then | |
1919 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.25 + 0.05 * math.cos(sine / 32))* angles(math.rad(35),math.rad(0),math.rad(0)),.3) | |
1920 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
1921 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(-60),math.rad(25)),.3) | |
1922 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(-25)),.3) | |
1923 | end | |
1924 | end | |
1925 | end | |
1926 | end |