SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
2 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
3 | do | |
4 | print("FE Compatibility code by Mokiros | Translated to FE by shazzam55") | |
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 | - | local plr = game:service'Players'.LocalPlayer |
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 | - | local mouse = plr:GetMouse() |
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 | --[[ Name : Bighead Mother ]]-- | |
85 | ------------------------------------------------------- | |
86 | --A script By makhail07 | |
87 | --Footplanting added by Nebula_Zorua (Nebula the Zorua#6969) | |
88 | ||
89 | --Discord Creterisk#2958 | |
90 | ||
91 | --NOTE THIS SCRIPT WAS PURELY MADE FROM MY FUCKING IMAGINATION | |
92 | --IF IT HAPPENS TO LOOK LIKE ANOTHER SCRIPT | |
93 | --DONT CALL IT A FUCKING BOOTLEG THANK YOU AND ENJOY THE SCRIPT | |
94 | --YOU FUCKING SKIDS, | |
95 | --For Those who log/decompile this, If you sell or trade this, | |
96 | --and I find out who you are, i will take massive action. | |
97 | ------------------------------------------------------- | |
98 | ||
99 | local FavIDs = { | |
100 | 340106355, --Nefl Crystals | |
101 | 927529620, --Dimension | |
102 | 876981900, --Fantasy | |
103 | 398987889, --Ordinary Days | |
104 | 1117396305, --Oh wait, it's you. | |
105 | 885996042, --Action Winter Journey | |
106 | 919231299, --Sprawling Idiot Effigy | |
107 | 743466274, --Good Day Sunshine | |
108 | 727411183, --Knife Fight | |
109 | 1402748531, --The Earth Is Counting On You! | |
110 | 595230126 --Robot Language | |
111 | } | |
112 | ||
113 | ||
114 | ||
115 | --The reality of my life isn't real but a Universe -makhail07 | |
116 | wait() | |
117 | local plr = owner | |
118 | print('Local Monster is '..plr.Name) | |
119 | warn'This was inspired by the Biggerhead creature in MisterObvious Roleplay world' | |
120 | print'press z to go nuts' | |
121 | local char = plr.Character | |
122 | local hum = char.Humanoid | |
123 | local ra = char["Right Arm"] | |
124 | local la= char["Left Arm"] | |
125 | local rl= char["Right Leg"] | |
126 | local ll = char["Left Leg"] | |
127 | local hed = char.Head | |
128 | local root = char.HumanoidRootPart | |
129 | local rootj = root.RootJoint | |
130 | local tors = char.Torso | |
131 | local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
132 | local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0) | |
133 | local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0) | |
134 | ||
135 | ||
136 | angry = false | |
137 | ||
138 | ||
139 | local Eye = Instance.new("Part") | |
140 | Eye.Parent = char | |
141 | Eye.Transparency = 1 | |
142 | Eye.Material = ("Neon") | |
143 | Eye.Name = "Eye" | |
144 | Eye.Size = Vector3.new(0.5, 0.5, 0.5) | |
145 | Eye.CFrame = char.Head.CFrame | |
146 | Eye:BreakJoints() | |
147 | Eye.CanCollide = false | |
148 | Eye.BrickColor = BrickColor.new("Medium Stone") | |
149 | Eye.TopSurface = "Smooth" | |
150 | Eye.BottomSurface = "Smooth" | |
151 | Weld = Instance.new("Weld") | |
152 | Weld.Name = "Weld" | |
153 | Weld.Part0 = char.Torso | |
154 | Weld.Part1 = Eye | |
155 | Weld.Parent = char.Torso | |
156 | Weld.C0 = CFrame.new(-.45, 0.45, -1.35)*CFrame.fromEulerAnglesXYZ(0, 0, 0.1) | |
157 | Mesh = Instance.new("SpecialMesh") | |
158 | Mesh.Parent = Eye | |
159 | Mesh.MeshType = "Sphere" | |
160 | Mesh.Scale = Vector3.new(1, 1, 1) | |
161 | ||
162 | local Eye2 = Instance.new("Part") | |
163 | Eye2.Parent = char | |
164 | Eye2.Transparency = 1 | |
165 | Eye2.Material = ("Neon") | |
166 | Eye2.Name = "Eye" | |
167 | Eye2.Size = Vector3.new(0.5, 0.5, 0.5) | |
168 | Eye2.CFrame = char.Head.CFrame | |
169 | Eye2:BreakJoints() | |
170 | Eye2.CanCollide = false | |
171 | Eye2.BrickColor = BrickColor.new("Medium Stone") | |
172 | Eye2.TopSurface = "Smooth" | |
173 | Eye2.BottomSurface = "Smooth" | |
174 | Weld = Instance.new("Weld") | |
175 | Weld.Name = "Weld" | |
176 | Weld.Part0 = char.Torso | |
177 | Weld.Part1 = Eye2 | |
178 | Weld.Parent = char.Torso | |
179 | Weld.C0 = CFrame.new(.45, 0.45, -1.35)*CFrame.fromEulerAnglesXYZ(0, 0, -0.1) | |
180 | Mesh = Instance.new("SpecialMesh") | |
181 | Mesh.Parent = Eye2 | |
182 | Mesh.MeshType = "Sphere" | |
183 | Mesh.Scale = Vector3.new(1, 1, 1) | |
184 | ------------------------------------------------------- | |
185 | --Start Good Stuff-- | |
186 | ------------------------------------------------------- | |
187 | CF = CFrame.new | |
188 | angles = CFrame.Angles | |
189 | attack = false | |
190 | Euler = CFrame.fromEulerAnglesXYZ | |
191 | Rad = math.rad | |
192 | IT = Instance.new | |
193 | BrickC = BrickColor.new | |
194 | Cos = math.cos | |
195 | Acos = math.acos | |
196 | Sin = math.sin | |
197 | Asin = math.asin | |
198 | Abs = math.abs | |
199 | Mrandom = math.random | |
200 | Floor = math.floor | |
201 | ------------------------------------------------------- | |
202 | --End Good Stuff-- | |
203 | ------------------------------------------------------- | |
204 | necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
205 | RSH, LSH = nil, nil | |
206 | RW = Instance.new("Weld") | |
207 | LW = Instance.new("Weld") | |
208 | RH = tors["Right Hip"] | |
209 | LH = tors["Left Hip"] | |
210 | RSH = tors["Right Shoulder"] | |
211 | LSH = tors["Left Shoulder"] | |
212 | RSH.Parent = nil | |
213 | LSH.Parent = nil | |
214 | RW.Name = "RW" | |
215 | RW.Part0 = tors | |
216 | RW.C0 = CF(1.5, 0.5, 0) | |
217 | RW.C1 = CF(0, 0.5, 0) | |
218 | RW.Part1 = ra | |
219 | RW.Parent = tors | |
220 | LW.Name = "LW" | |
221 | LW.Part0 = tors | |
222 | LW.C0 = CF(-1.5, 0.5, 0) | |
223 | LW.C1 = CF(0, 0.5, 0) | |
224 | LW.Part1 = la | |
225 | LW.Parent = tors | |
226 | Effects = {} | |
227 | ||
228 | local BC = char["Body Colors"] | |
229 | BC.HeadColor = BrickColor.new("Really red") | |
230 | BC.LeftArmColor = BrickColor.new("Really red") | |
231 | BC.LeftLegColor = BrickColor.new("Really red") | |
232 | BC.RightArmColor = BrickColor.new("Really red") | |
233 | BC.RightLegColor = BrickColor.new("Really red") | |
234 | BC.TorsoColor = BrickColor.new("Really red") | |
235 | ||
236 | hed.Transparency = 1 | |
237 | ra.Transparency = 1 | |
238 | la.Transparency = 1 | |
239 | if hed:FindFirstChildWhichIsA("Decal") then | |
240 | hed:FindFirstChildWhichIsA("Decal"):Destroy() | |
241 | end | |
242 | ||
243 | local Haed = Instance.new("SpecialMesh") | |
244 | Haed.Parent = tors | |
245 | Haed.MeshId = "http://www.roblox.com/asset/?id=1047997" | |
246 | Haed.TextureId = "http://www.roblox.com/asset/?id=1048208" | |
247 | Haed.Scale = Vector3.new(1.5,1.5,1.5) | |
248 | ||
249 | local Leg1 = Instance.new("SpecialMesh") | |
250 | Leg1.Parent = rl | |
251 | Leg1.MeshType = "Brick" | |
252 | Leg1.Scale = Vector3.new(.5,2,.5) | |
253 | ||
254 | local Leg2 = Instance.new("SpecialMesh") | |
255 | Leg2.Parent = ll | |
256 | Leg2.MeshType = "Brick" | |
257 | Leg2.Scale = Vector3.new(.5,2,.5) | |
258 | ||
259 | ------------------------------------------------------- | |
260 | --Start HeartBeat-- | |
261 | ------------------------------------------------------- | |
262 | ArtificialHB = Instance.new("BindableEvent", script) | |
263 | ArtificialHB.Name = "Heartbeat" | |
264 | script:WaitForChild("Heartbeat") | |
265 | ||
266 | frame = 1 / 60 | |
267 | tf = 0 | |
268 | allowframeloss = false | |
269 | tossremainder = false | |
270 | ||
271 | ||
272 | lastframe = tick() | |
273 | script.Heartbeat:Fire() | |
274 | ||
275 | ||
276 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
277 | tf = tf + s | |
278 | if tf >= frame then | |
279 | if allowframeloss then | |
280 | script.Heartbeat:Fire() | |
281 | lastframe = tick() | |
282 | else | |
283 | for i = 1, math.floor(tf / frame) do | |
284 | script.Heartbeat:Fire() | |
285 | end | |
286 | lastframe = tick() | |
287 | end | |
288 | if tossremainder then | |
289 | tf = 0 | |
290 | else | |
291 | tf = tf - frame * math.floor(tf / frame) | |
292 | end | |
293 | end | |
294 | end) | |
295 | ------------------------------------------------------- | |
296 | --End HeartBeat-- | |
297 | ------------------------------------------------------- | |
298 | ||
299 | ------------------------------------------------------- | |
300 | --Start Important Functions-- | |
301 | ------------------------------------------------------- | |
302 | ||
303 | function thread(f) | |
304 | coroutine.resume(coroutine.create(f)) | |
305 | end | |
306 | function clerp(a, b, t) | |
307 | local qa = { | |
308 | QuaternionFromCFrame(a) | |
309 | } | |
310 | local qb = { | |
311 | QuaternionFromCFrame(b) | |
312 | } | |
313 | local ax, ay, az = a.x, a.y, a.z | |
314 | local bx, by, bz = b.x, b.y, b.z | |
315 | local _t = 1 - t | |
316 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
317 | end | |
318 | function QuaternionFromCFrame(cf) | |
319 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
320 | local trace = m00 + m11 + m22 | |
321 | if trace > 0 then | |
322 | local s = math.sqrt(1 + trace) | |
323 | local recip = 0.5 / s | |
324 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
325 | else | |
326 | local i = 0 | |
327 | if m00 < m11 then | |
328 | i = 1 | |
329 | end | |
330 | if m22 > (i == 0 and m00 or m11) then | |
331 | i = 2 | |
332 | end | |
333 | if i == 0 then | |
334 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
335 | local recip = 0.5 / s | |
336 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
337 | elseif i == 1 then | |
338 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
339 | local recip = 0.5 / s | |
340 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
341 | elseif i == 2 then | |
342 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
343 | local recip = 0.5 / s | |
344 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
345 | end | |
346 | end | |
347 | end | |
348 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
349 | local xs, ys, zs = x + x, y + y, z + z | |
350 | local wx, wy, wz = w * xs, w * ys, w * zs | |
351 | local xx = x * xs | |
352 | local xy = x * ys | |
353 | local xz = x * zs | |
354 | local yy = y * ys | |
355 | local yz = y * zs | |
356 | local zz = z * zs | |
357 | 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)) | |
358 | end | |
359 | function QuaternionSlerp(a, b, t) | |
360 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
361 | local startInterp, finishInterp | |
362 | if cosTheta >= 1.0E-4 then | |
363 | if 1 - cosTheta > 1.0E-4 then | |
364 | local theta = math.acos(cosTheta) | |
365 | local invSinTheta = 1 / Sin(theta) | |
366 | startInterp = Sin((1 - t) * theta) * invSinTheta | |
367 | finishInterp = Sin(t * theta) * invSinTheta | |
368 | else | |
369 | startInterp = 1 - t | |
370 | finishInterp = t | |
371 | end | |
372 | elseif 1 + cosTheta > 1.0E-4 then | |
373 | local theta = math.acos(-cosTheta) | |
374 | local invSinTheta = 1 / Sin(theta) | |
375 | startInterp = Sin((t - 1) * theta) * invSinTheta | |
376 | finishInterp = Sin(t * theta) * invSinTheta | |
377 | else | |
378 | startInterp = t - 1 | |
379 | finishInterp = t | |
380 | - | Value = game:service("Players").LocalPlayer, |
380 | + | |
381 | 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 | |
382 | end | |
383 | function rayCast(Position, Direction, Range, Ignore) | |
384 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
385 | end | |
386 | local RbxUtility = LoadLibrary("RbxUtility") | |
387 | local Create = RbxUtility.Create | |
388 | ||
389 | ||
390 | local ArtificialHB = Instance.new("BindableEvent", script) | |
391 | ArtificialHB.Name = "Heartbeat" | |
392 | ||
393 | script:WaitForChild("Heartbeat") | |
394 | ||
395 | local tf = 0 | |
396 | local allowframeloss = false | |
397 | local tossremainder = false | |
398 | local lastframe = tick() | |
399 | local frame = 1/60 | |
400 | ArtificialHB:Fire() | |
401 | ||
402 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
403 | tf = tf + s | |
404 | if tf >= frame then | |
405 | if allowframeloss then | |
406 | script.Heartbeat:Fire() | |
407 | lastframe = tick() | |
408 | else | |
409 | for i = 1, math.floor(tf / frame) do | |
410 | ArtificialHB:Fire() | |
411 | end | |
412 | lastframe = tick() | |
413 | end | |
414 | if tossremainder then | |
415 | tf = 0 | |
416 | else | |
417 | tf = tf - frame * math.floor(tf / frame) | |
418 | end | |
419 | end | |
420 | end) | |
421 | ||
422 | function swait(num) | |
423 | if num == 0 or num == nil then | |
424 | ArtificialHB.Event:wait() | |
425 | else | |
426 | for i = 0, num do | |
427 | ArtificialHB.Event:wait() | |
428 | end | |
429 | end | |
430 | end | |
431 | ||
432 | ------------------------------------------------------- | |
433 | --Start Damage Function-- | |
434 | ------------------------------------------------------- | |
435 | function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
436 | if hit.Parent == nil then | |
437 | return | |
438 | end | |
439 | local h = hit.Parent:FindFirstChildOfClass("Humanoid") | |
440 | for _, v in pairs(hit.Parent:children()) do | |
441 | if v:IsA("Humanoid") then | |
442 | h = v | |
443 | end | |
444 | end | |
445 | if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then | |
446 | ||
447 | hit.Parent:FindFirstChild("Head"):BreakJoints() | |
448 | end | |
449 | ||
450 | if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
451 | if hit.Parent:findFirstChild("DebounceHit") ~= nil then | |
452 | if hit.Parent.DebounceHit.Value == true then | |
453 | return | |
454 | end | |
455 | end | |
456 | if insta == true then | |
457 | hit.Parent:FindFirstChild("Head"):BreakJoints() | |
458 | end | |
459 | local c = Create("ObjectValue"){ | |
460 | Name = "creator", | |
461 | Value = owner, | |
462 | Parent = h, | |
463 | } | |
464 | game:GetService("Debris"):AddItem(c, .5) | |
465 | if HitSound ~= nil and HitPitch ~= nil then | |
466 | CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) | |
467 | end | |
468 | local Damage = math.random(minim, maxim) | |
469 | local blocked = false | |
470 | local block = hit.Parent:findFirstChild("Block") | |
471 | if block ~= nil then | |
472 | if block.className == "IntValue" then | |
473 | if block.Value > 0 then | |
474 | blocked = true | |
475 | block.Value = block.Value - 1 | |
476 | print(block.Value) | |
477 | end | |
478 | end | |
479 | end | |
480 | if blocked == false then | |
481 | h.Health = h.Health - Damage | |
482 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color) | |
483 | else | |
484 | h.Health = h.Health - (Damage / 2) | |
485 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color) | |
486 | end | |
487 | if Type == "Knockdown" then | |
488 | local hum = hit.Parent.Humanoid | |
489 | hum.PlatformStand = true | |
490 | coroutine.resume(coroutine.create(function(HHumanoid) | |
491 | swait(1) | |
492 | HHumanoid.PlatformStand = false | |
493 | end), hum) | |
494 | local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit | |
495 | local bodvol = Create("BodyVelocity"){ | |
496 | velocity = angle * knockback, | |
497 | P = 5000, | |
498 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
499 | Parent = hit, | |
500 | } | |
501 | local rl = Create("BodyAngularVelocity"){ | |
502 | P = 3000, | |
503 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
504 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
505 | Parent = hit, | |
506 | } | |
507 | game:GetService("Debris"):AddItem(bodvol, .5) | |
508 | game:GetService("Debris"):AddItem(rl, .5) | |
509 | elseif Type == "Normal" then | |
510 | local vp = Create("BodyVelocity"){ | |
511 | P = 500, | |
512 | maxForce = Vector3.new(math.huge, 0, math.huge), | |
513 | velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05, | |
514 | } | |
515 | if knockback > 0 then | |
516 | vp.Parent = hit.Parent.Torso | |
517 | end | |
518 | game:GetService("Debris"):AddItem(vp, .5) | |
519 | elseif Type == "Up" then | |
520 | local bodyVelocity = Create("BodyVelocity"){ | |
521 | velocity = Vector3.new(0, 20, 0), | |
522 | P = 5000, | |
523 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
524 | Parent = hit, | |
525 | } | |
526 | game:GetService("Debris"):AddItem(bodyVelocity, .5) | |
527 | elseif Type == "DarkUp" then | |
528 | coroutine.resume(coroutine.create(function() | |
529 | for i = 0, 1, 0.1 do | |
530 | swait() | |
531 | Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1) | |
532 | end | |
533 | end)) | |
534 | local bodyVelocity = Create("BodyVelocity"){ | |
535 | velocity = Vector3.new(0, 20, 0), | |
536 | P = 5000, | |
537 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
538 | Parent = hit, | |
539 | } | |
540 | game:GetService("Debris"):AddItem(bodyVelocity, 1) | |
541 | elseif Type == "Snare" then | |
542 | local bp = Create("BodyPosition"){ | |
543 | P = 2000, | |
544 | D = 100, | |
545 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
546 | position = hit.Parent.Torso.Position, | |
547 | Parent = hit.Parent.Torso, | |
548 | } | |
549 | game:GetService("Debris"):AddItem(bp, 1) | |
550 | elseif Type == "Freeze" then | |
551 | local BodPos = Create("BodyPosition"){ | |
552 | P = 50000, | |
553 | D = 1000, | |
554 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
555 | position = hit.Parent.Torso.Position, | |
556 | Parent = hit.Parent.Torso, | |
557 | } | |
558 | local BodGy = Create("BodyGyro") { | |
559 | maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge , | |
560 | P = 20e+003, | |
561 | Parent = hit.Parent.Torso, | |
562 | cframe = hit.Parent.Torso.CFrame, | |
563 | } | |
564 | hit.Parent.Torso.Anchored = true | |
565 | coroutine.resume(coroutine.create(function(Part) | |
566 | swait(1.5) | |
567 | Part.Anchored = false | |
568 | end), hit.Parent.Torso) | |
569 | game:GetService("Debris"):AddItem(BodPos, 3) | |
570 | game:GetService("Debris"):AddItem(BodGy, 3) | |
571 | end | |
572 | local debounce = Create("BoolValue"){ | |
573 | Name = "DebounceHit", | |
574 | Parent = hit.Parent, | |
575 | Value = true, | |
576 | } | |
577 | game:GetService("Debris"):AddItem(debounce, Delay) | |
578 | c = Create("ObjectValue"){ | |
579 | Name = "creator", | |
580 | Value = Player, | |
581 | Parent = h, | |
582 | } | |
583 | game:GetService("Debris"):AddItem(c, .5) | |
584 | end | |
585 | end | |
586 | ------------------------------------------------------- | |
587 | --End Damage Function-- | |
588 | ------------------------------------------------------- | |
589 | ||
590 | ------------------------------------------------------- | |
591 | --Start Damage Function Customization-- | |
592 | ------------------------------------------------------- | |
593 | function ShowDamage(Pos, Text, Time, Color) | |
594 | local Rate = (1 / 30) | |
595 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
596 | local Text = (Text or "") | |
597 | local Time = (Time or 2) | |
598 | local Color = (Color or Color3.new(1, 0, 1)) | |
599 | local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
600 | EffectPart.Anchored = true | |
601 | local BillboardGui = Create("BillboardGui"){ | |
602 | Size = UDim2.new(3, 0, 3, 0), | |
603 | Adornee = EffectPart, | |
604 | Parent = EffectPart, | |
605 | } | |
606 | local TextLabel = Create("TextLabel"){ | |
607 | BackgroundTransparency = 1, | |
608 | Size = UDim2.new(1, 0, 1, 0), | |
609 | Text = Text, | |
610 | Font = "Bodoni", | |
611 | TextColor3 = Color, | |
612 | TextScaled = true, | |
613 | TextStrokeColor3 = Color3.fromRGB(0,0,0), | |
614 | Parent = BillboardGui, | |
615 | } | |
616 | game.Debris:AddItem(EffectPart, (Time)) | |
617 | EffectPart.Parent = game:GetService("Workspace") | |
618 | delay(0, function() | |
619 | local Frames = (Time / Rate) | |
620 | for Frame = 1, Frames do | |
621 | wait(Rate) | |
622 | local Percent = (Frame / Frames) | |
623 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
624 | TextLabel.TextTransparency = Percent | |
625 | end | |
626 | if EffectPart and EffectPart.Parent then | |
627 | EffectPart:Destroy() | |
628 | end | |
629 | end) | |
630 | end | |
631 | ------------------------------------------------------- | |
632 | --End Damage Function Customization-- | |
633 | ------------------------------------------------------- | |
634 | ||
635 | function MagniDamage(Part, magni, mindam, maxdam, knock, Type) | |
636 | for _, c in pairs(workspace:children()) do | |
637 | local hum = c:findFirstChild("Humanoid") | |
638 | if hum ~= nil then | |
639 | local head = c:findFirstChild("Head") | |
640 | if head ~= nil then | |
641 | local targ = head.Position - Part.Position | |
642 | local mag = targ.magnitude | |
643 | if magni >= mag and c.Name ~= plr.Name then | |
644 | Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=0", 1.2) | |
645 | end | |
646 | end | |
647 | end | |
648 | end | |
649 | end | |
650 | ||
651 | ||
652 | CFuncs = { | |
653 | Part = { | |
654 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
655 | local Part = Create("Part")({ | |
656 | Parent = Parent, | |
657 | Reflectance = Reflectance, | |
658 | Transparency = Transparency, | |
659 | CanCollide = false, | |
660 | Locked = true, | |
661 | BrickColor = BrickColor.new(tostring(BColor)), | |
662 | Name = Name, | |
663 | Size = Size, | |
664 | Material = Material | |
665 | }) | |
666 | RemoveOutlines(Part) | |
667 | return Part | |
668 | end | |
669 | }, | |
670 | Mesh = { | |
671 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
672 | local Msh = Create(Mesh)({ | |
673 | Parent = Part, | |
674 | Offset = OffSet, | |
675 | Scale = Scale | |
676 | }) | |
677 | if Mesh == "SpecialMesh" then | |
678 | Msh.MeshType = MeshType | |
679 | Msh.MeshId = MeshId | |
680 | end | |
681 | return Msh | |
682 | end | |
683 | }, | |
684 | Mesh = { | |
685 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
686 | local Msh = Create(Mesh)({ | |
687 | Parent = Part, | |
688 | Offset = OffSet, | |
689 | Scale = Scale | |
690 | }) | |
691 | if Mesh == "SpecialMesh" then | |
692 | Msh.MeshType = MeshType | |
693 | Msh.MeshId = MeshId | |
694 | end | |
695 | return Msh | |
696 | end | |
697 | }, | |
698 | Weld = { | |
699 | Create = function(Parent, Part0, Part1, C0, C1) | |
700 | local Weld = Create("Weld")({ | |
701 | Parent = Parent, | |
702 | Part0 = Part0, | |
703 | Part1 = Part1, | |
704 | C0 = C0, | |
705 | C1 = C1 | |
706 | }) | |
707 | return Weld | |
708 | end | |
709 | }, | |
710 | Sound = { | |
711 | Create = function(id, par, vol, pit) | |
712 | coroutine.resume(coroutine.create(function() | |
713 | local S = Create("Sound")({ | |
714 | Volume = vol, | |
715 | Pitch = pit or 1, | |
716 | SoundId = id, | |
717 | Parent = par or workspace | |
718 | }) | |
719 | wait() | |
720 | S:play() | |
721 | game:GetService("Debris"):AddItem(S, 6) | |
722 | end)) | |
723 | end | |
724 | }, | |
725 | ParticleEmitter = { | |
726 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
727 | local fp = Create("ParticleEmitter")({ | |
728 | Parent = Parent, | |
729 | Color = ColorSequence.new(Color1, Color2), | |
730 | LightEmission = LightEmission, | |
731 | Size = Size, | |
732 | Texture = Texture, | |
733 | Transparency = Transparency, | |
734 | ZOffset = ZOffset, | |
735 | Acceleration = Accel, | |
736 | Drag = Drag, | |
737 | LockedToPart = LockedToPart, | |
738 | VelocityInheritance = VelocityInheritance, | |
739 | EmissionDirection = EmissionDirection, | |
740 | Enabled = Enabled, | |
741 | Lifetime = LifeTime, | |
742 | Rate = Rate, | |
743 | Rotation = Rotation, | |
744 | RotSpeed = RotSpeed, | |
745 | Speed = Speed, | |
746 | VelocitySpread = VelocitySpread | |
747 | }) | |
748 | return fp | |
749 | end | |
750 | } | |
751 | } | |
752 | function RemoveOutlines(part) | |
753 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
754 | end | |
755 | function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
756 | local Part = Create("Part")({ | |
757 | formFactor = FormFactor, | |
758 | Parent = Parent, | |
759 | Reflectance = Reflectance, | |
760 | Transparency = Transparency, | |
761 | CanCollide = false, | |
762 | Locked = true, | |
763 | BrickColor = BrickColor.new(tostring(BColor)), | |
764 | Name = Name, | |
765 | Size = Size, | |
766 | Material = Material | |
767 | }) | |
768 | RemoveOutlines(Part) | |
769 | return Part | |
770 | end | |
771 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
772 | local Msh = Create(Mesh)({ | |
773 | Parent = Part, | |
774 | Offset = OffSet, | |
775 | Scale = Scale | |
776 | }) | |
777 | if Mesh == "SpecialMesh" then | |
778 | Msh.MeshType = MeshType | |
779 | Msh.MeshId = MeshId | |
780 | end | |
781 | return Msh | |
782 | end | |
783 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
784 | local Weld = Create("Weld")({ | |
785 | Parent = Parent, | |
786 | Part0 = Part0, | |
787 | Part1 = Part1, | |
788 | C0 = C0, | |
789 | C1 = C1 | |
790 | }) | |
791 | return Weld | |
792 | end | |
793 | ||
794 | ||
795 | ------------------------------------------------------- | |
796 | --Start Effect Function-- | |
797 | ------------------------------------------------------- | |
798 | EffectModel = Instance.new("Model", char) | |
799 | Effects = { | |
800 | Block = { | |
801 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
802 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
803 | prt.Anchored = true | |
804 | prt.CFrame = cframe | |
805 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
806 | game:GetService("Debris"):AddItem(prt, 10) | |
807 | if Type == 1 or Type == nil then | |
808 | table.insert(Effects, { | |
809 | prt, | |
810 | "Block1", | |
811 | delay, | |
812 | x3, | |
813 | y3, | |
814 | z3, | |
815 | msh | |
816 | }) | |
817 | elseif Type == 2 then | |
818 | table.insert(Effects, { | |
819 | prt, | |
820 | "Block2", | |
821 | delay, | |
822 | x3, | |
823 | y3, | |
824 | z3, | |
825 | msh | |
826 | }) | |
827 | else | |
828 | table.insert(Effects, { | |
829 | prt, | |
830 | "Block3", | |
831 | delay, | |
832 | x3, | |
833 | y3, | |
834 | z3, | |
835 | msh | |
836 | }) | |
837 | end | |
838 | end | |
839 | }, | |
840 | Sphere = { | |
841 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
842 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
843 | prt.Anchored = true | |
844 | prt.CFrame = cframe | |
845 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
846 | game:GetService("Debris"):AddItem(prt, 10) | |
847 | table.insert(Effects, { | |
848 | prt, | |
849 | "Cylinder", | |
850 | delay, | |
851 | x3, | |
852 | y3, | |
853 | z3, | |
854 | msh | |
855 | }) | |
856 | end | |
857 | }, | |
858 | Cylinder = { | |
859 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
860 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
861 | prt.Anchored = true | |
862 | prt.CFrame = cframe | |
863 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
864 | game:GetService("Debris"):AddItem(prt, 10) | |
865 | table.insert(Effects, { | |
866 | prt, | |
867 | "Cylinder", | |
868 | delay, | |
869 | x3, | |
870 | y3, | |
871 | z3, | |
872 | msh | |
873 | }) | |
874 | end | |
875 | }, | |
876 | Wave = { | |
877 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
878 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
879 | prt.Anchored = true | |
880 | prt.CFrame = cframe | |
881 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60)) | |
882 | game:GetService("Debris"):AddItem(prt, 10) | |
883 | table.insert(Effects, { | |
884 | prt, | |
885 | "Cylinder", | |
886 | delay, | |
887 | x3 / 60, | |
888 | y3 / 60, | |
889 | z3 / 60, | |
890 | msh | |
891 | }) | |
892 | end | |
893 | }, | |
894 | Ring = { | |
895 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
896 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
897 | prt.Anchored = true | |
898 | prt.CFrame = cframe | |
899 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
900 | game:GetService("Debris"):AddItem(prt, 10) | |
901 | table.insert(Effects, { | |
902 | prt, | |
903 | "Cylinder", | |
904 | delay, | |
905 | x3, | |
906 | y3, | |
907 | z3, | |
908 | msh | |
909 | }) | |
910 | end | |
911 | }, | |
912 | Break = { | |
913 | Create = function(brickcolor, cframe, x1, y1, z1) | |
914 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
915 | prt.Anchored = true | |
916 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
917 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
918 | local num = math.random(10, 50) / 1000 | |
919 | game:GetService("Debris"):AddItem(prt, 10) | |
920 | table.insert(Effects, { | |
921 | prt, | |
922 | "Shatter", | |
923 | num, | |
924 | prt.CFrame, | |
925 | math.random() - math.random(), | |
926 | 0, | |
927 | math.random(50, 100) / 100 | |
928 | }) | |
929 | end | |
930 | }, | |
931 | Spiral = { | |
932 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
933 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
934 | prt.Anchored = true | |
935 | prt.CFrame = cframe | |
936 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://1051557", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
937 | game:GetService("Debris"):AddItem(prt, 10) | |
938 | table.insert(Effects, { | |
939 | prt, | |
940 | "Cylinder", | |
941 | delay, | |
942 | x3, | |
943 | y3, | |
944 | z3, | |
945 | msh | |
946 | }) | |
947 | end | |
948 | }, | |
949 | Push = { | |
950 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
951 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
952 | prt.Anchored = true | |
953 | prt.CFrame = cframe | |
954 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
955 | game:GetService("Debris"):AddItem(prt, 10) | |
956 | table.insert(Effects, { | |
957 | prt, | |
958 | "Cylinder", | |
959 | delay, | |
960 | x3, | |
961 | y3, | |
962 | z3, | |
963 | msh | |
964 | }) | |
965 | end | |
966 | } | |
967 | } | |
968 | function part(formfactor ,parent, reflectance, transparency, brickcolor, name, size) | |
969 | local fp = IT("Part") | |
970 | fp.formFactor = formfactor | |
971 | fp.Parent = parent | |
972 | fp.Reflectance = reflectance | |
973 | fp.Transparency = transparency | |
974 | fp.CanCollide = false | |
975 | fp.Locked = true | |
976 | fp.BrickColor = brickcolor | |
977 | fp.Name = name | |
978 | fp.Size = size | |
979 | fp.Position = tors.Position | |
980 | RemoveOutlines(fp) | |
981 | fp.Material = "SmoothPlastic" | |
982 | fp:BreakJoints() | |
983 | return fp | |
984 | end | |
985 | ||
986 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
987 | local mesh = IT(Mesh) | |
988 | mesh.Parent = part | |
989 | if Mesh == "SpecialMesh" then | |
990 | mesh.MeshType = meshtype | |
991 | if meshid ~= "nil" then | |
992 | mesh.MeshId = "http://www.roblox.com/asset/?id="..meshid | |
993 | end | |
994 | end | |
995 | mesh.Offset = offset | |
996 | mesh.Scale = scale | |
997 | return mesh | |
998 | end | |
999 | ||
1000 | function Magic(bonuspeed, type, pos, scale, value, color, MType) | |
1001 | local type = type | |
1002 | local rng = Instance.new("Part", char) | |
1003 | rng.Anchored = true | |
1004 | rng.BrickColor = color | |
1005 | rng.CanCollide = false | |
1006 | rng.FormFactor = 3 | |
1007 | rng.Name = "Ring" | |
1008 | rng.Material = "Neon" | |
1009 | rng.Size = Vector3.new(1, 1, 1) | |
1010 | rng.Transparency = 0 | |
1011 | rng.TopSurface = 0 | |
1012 | rng.BottomSurface = 0 | |
1013 | rng.CFrame = pos | |
1014 | local rngm = Instance.new("SpecialMesh", rng) | |
1015 | rngm.MeshType = MType | |
1016 | rngm.Scale = scale | |
1017 | local scaler2 = 1 | |
1018 | if type == "Add" then | |
1019 | scaler2 = 1 * value | |
1020 | elseif type == "Divide" then | |
1021 | scaler2 = 1 / value | |
1022 | end | |
1023 | coroutine.resume(coroutine.create(function() | |
1024 | for i = 0, 10 / bonuspeed, 0.1 do | |
1025 | swait() | |
1026 | if type == "Add" then | |
1027 | scaler2 = scaler2 - 0.01 * value / bonuspeed | |
1028 | elseif type == "Divide" then | |
1029 | scaler2 = scaler2 - 0.01 / value * bonuspeed | |
1030 | end | |
1031 | rng.Transparency = rng.Transparency + 0.01 * bonuspeed | |
1032 | rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, scaler2 * bonuspeed) | |
1033 | end | |
1034 | rng:Destroy() | |
1035 | end)) | |
1036 | end | |
1037 | ||
1038 | function Eviscerate(dude) | |
1039 | if dude.Name ~= char then | |
1040 | local bgf = IT("BodyGyro", dude.Head) | |
1041 | bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0) | |
1042 | local val = IT("BoolValue", dude) | |
1043 | val.Name = "IsHit" | |
1044 | local ds = coroutine.wrap(function() | |
1045 | dude:WaitForChild("Head"):BreakJoints() | |
1046 | wait(0.5) | |
1047 | target = nil | |
1048 | coroutine.resume(coroutine.create(function() | |
1049 | for i, v in pairs(dude:GetChildren()) do | |
1050 | if v:IsA("Accessory") then | |
1051 | v:Destroy() | |
1052 | end | |
1053 | if v:IsA("Humanoid") then | |
1054 | v:Destroy() | |
1055 | end | |
1056 | if v:IsA("CharacterMesh") then | |
1057 | v:Destroy() | |
1058 | end | |
1059 | if v:IsA("Model") then | |
1060 | v:Destroy() | |
1061 | end | |
1062 | if v:IsA("Part") or v:IsA("MeshPart") then | |
1063 | for x, o in pairs(v:GetChildren()) do | |
1064 | if o:IsA("Decal") then | |
1065 | o:Destroy() | |
1066 | end | |
1067 | end | |
1068 | coroutine.resume(coroutine.create(function() | |
1069 | v.Material = "Neon" | |
1070 | v.CanCollide = false | |
1071 | local PartEmmit1 = IT("ParticleEmitter", v) | |
1072 | PartEmmit1.LightEmission = 1 | |
1073 | PartEmmit1.Texture = "rbxassetid://284205403" | |
1074 | PartEmmit1.Color = ColorSequence.new(maincolor.Color) | |
1075 | PartEmmit1.Rate = 150 | |
1076 | PartEmmit1.Lifetime = NumberRange.new(1) | |
1077 | PartEmmit1.Size = NumberSequence.new({ | |
1078 | NumberSequenceKeypoint.new(0, 0.75, 0), | |
1079 | NumberSequenceKeypoint.new(1, 0, 0) | |
1080 | }) | |
1081 | PartEmmit1.Transparency = NumberSequence.new({ | |
1082 | NumberSequenceKeypoint.new(0, 0, 0), | |
1083 | NumberSequenceKeypoint.new(1, 1, 0) | |
1084 | }) | |
1085 | PartEmmit1.Speed = NumberRange.new(0, 0) | |
1086 | PartEmmit1.VelocitySpread = 30000 | |
1087 | PartEmmit1.Rotation = NumberRange.new(-500, 500) | |
1088 | PartEmmit1.RotSpeed = NumberRange.new(-500, 500) | |
1089 | local BodPoss = IT("BodyPosition", v) | |
1090 | BodPoss.P = 3000 | |
1091 | BodPoss.D = 1000 | |
1092 | BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000) | |
1093 | BodPoss.position = v.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15)) | |
1094 | v.Color = maincolor.Color | |
1095 | coroutine.resume(coroutine.create(function() | |
1096 | for i = 0, 49 do | |
1097 | swait(1) | |
1098 | v.Transparency = v.Transparency + 0.08 | |
1099 | end | |
1100 | wait(0.5) | |
1101 | PartEmmit1.Enabled = false | |
1102 | wait(3) | |
1103 | v:Destroy() | |
1104 | dude:Destroy() | |
1105 | end)) | |
1106 | end)) | |
1107 | end | |
1108 | end | |
1109 | end)) | |
1110 | end) | |
1111 | ds() | |
1112 | end | |
1113 | end | |
1114 | ||
1115 | function FindNearestHead(Position, Distance, SinglePlayer) | |
1116 | if SinglePlayer then | |
1117 | return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude | |
1118 | end | |
1119 | local List = {} | |
1120 | for i, v in pairs(workspace:GetChildren()) do | |
1121 | if v:IsA("Model") and v:findFirstChild("Head") and v ~= char and Distance >= (v.Head.Position - Position).magnitude then | |
1122 | table.insert(List, v) | |
1123 | end | |
1124 | end | |
1125 | return List | |
1126 | end | |
1127 | ||
1128 | function Aura(bonuspeed, FastSpeed, type, pos, x1, y1, z1, value, color, outerpos, MType) | |
1129 | local type = type | |
1130 | local rng = Instance.new("Part", char) | |
1131 | rng.Anchored = true | |
1132 | rng.BrickColor = color | |
1133 | rng.CanCollide = false | |
1134 | rng.FormFactor = 3 | |
1135 | rng.Name = "Ring" | |
1136 | rng.Material = "Neon" | |
1137 | rng.Size = Vector3.new(1, 1, 1) | |
1138 | rng.Transparency = 0 | |
1139 | rng.TopSurface = 0 | |
1140 | rng.BottomSurface = 0 | |
1141 | rng.CFrame = pos | |
1142 | rng.CFrame = rng.CFrame + rng.CFrame.lookVector * outerpos | |
1143 | local rngm = Instance.new("SpecialMesh", rng) | |
1144 | rngm.MeshType = MType | |
1145 | rngm.Scale = Vector3.new(x1, y1, z1) | |
1146 | local scaler2 = 1 | |
1147 | local speeder = FastSpeed | |
1148 | if type == "Add" then | |
1149 | scaler2 = 1 * value | |
1150 | elseif type == "Divide" then | |
1151 | scaler2 = 1 / value | |
1152 | end | |
1153 | coroutine.resume(coroutine.create(function() | |
1154 | for i = 0, 10 / bonuspeed, 0.1 do | |
1155 | swait() | |
1156 | if type == "Add" then | |
1157 | scaler2 = scaler2 - 0.01 * value / bonuspeed | |
1158 | elseif type == "Divide" then | |
1159 | scaler2 = scaler2 - 0.01 / value * bonuspeed | |
1160 | end | |
1161 | speeder = speeder - 0.01 * FastSpeed * bonuspeed | |
1162 | rng.CFrame = rng.CFrame + rng.CFrame.lookVector * speeder * bonuspeed | |
1163 | rng.Transparency = rng.Transparency + 0.01 * bonuspeed | |
1164 | rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, 0) | |
1165 | end | |
1166 | rng:Destroy() | |
1167 | end)) | |
1168 | end | |
1169 | ||
1170 | function SoulSteal(dude) | |
1171 | if dude.Name ~= char then | |
1172 | local bgf = IT("BodyGyro", dude.Head) | |
1173 | bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0) | |
1174 | local val = IT("BoolValue", dude) | |
1175 | val.Name = "IsHit" | |
1176 | local torso = (dude:FindFirstChild'Head' or dude:FindFirstChild'Torso' or dude:FindFirstChild'UpperTorso' or dude:FindFirstChild'LowerTorso' or dude:FindFirstChild'HumanoidRootPart') | |
1177 | local soulst = coroutine.wrap(function() | |
1178 | local soul = Instance.new("Part",dude) | |
1179 | soul.Size = Vector3.new(1,1,1) | |
1180 | soul.CanCollide = false | |
1181 | soul.Anchored = false | |
1182 | soul.Position = torso.Position | |
1183 | soul.Transparency = 1 | |
1184 | local PartEmmit1 = IT("ParticleEmitter", soul) | |
1185 | PartEmmit1.LightEmission = 1 | |
1186 | PartEmmit1.Texture = "rbxassetid://569507414" | |
1187 | PartEmmit1.Color = ColorSequence.new(maincolor.Color) | |
1188 | PartEmmit1.Rate = 250 | |
1189 | PartEmmit1.Lifetime = NumberRange.new(1.6) | |
1190 | PartEmmit1.Size = NumberSequence.new({ | |
1191 | NumberSequenceKeypoint.new(0, 1, 0), | |
1192 | NumberSequenceKeypoint.new(1, 0, 0) | |
1193 | }) | |
1194 | PartEmmit1.Transparency = NumberSequence.new({ | |
1195 | NumberSequenceKeypoint.new(0, 0, 0), | |
1196 | NumberSequenceKeypoint.new(1, 1, 0) | |
1197 | }) | |
1198 | PartEmmit1.Speed = NumberRange.new(0, 0) | |
1199 | PartEmmit1.VelocitySpread = 30000 | |
1200 | PartEmmit1.Rotation = NumberRange.new(-360, 360) | |
1201 | PartEmmit1.RotSpeed = NumberRange.new(-360, 360) | |
1202 | local BodPoss = IT("BodyPosition", soul) | |
1203 | BodPoss.P = 3000 | |
1204 | BodPoss.D = 1000 | |
1205 | BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000) | |
1206 | BodPoss.position = torso.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15)) | |
1207 | wait(1.6) | |
1208 | soul.Touched:connect(function(hit) | |
1209 | if hit.Parent == char then | |
1210 | soul:Destroy() | |
1211 | end | |
1212 | end) | |
1213 | wait(1.2) | |
1214 | while soul do | |
1215 | swait() | |
1216 | PartEmmit1.Color = ColorSequence.new(maincolor.Color) | |
1217 | BodPoss.Position = tors.Position | |
1218 | end | |
1219 | end) | |
1220 | soulst() | |
1221 | end | |
1222 | end | |
1223 | function FaceMouse() | |
1224 | local Cam = workspace.CurrentCamera | |
1225 | return { | |
1226 | CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)), | |
1227 | Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z) | |
1228 | } | |
1229 | end | |
1230 | ------------------------------------------------------- | |
1231 | --End Effect Function-- | |
1232 | ------------------------------------------------------- | |
1233 | function Cso(ID, PARENT, VOLUME, PITCH) | |
1234 | local NSound = nil | |
1235 | coroutine.resume(coroutine.create(function() | |
1236 | NSound = IT("Sound", PARENT) | |
1237 | NSound.Volume = VOLUME | |
1238 | NSound.Pitch = PITCH | |
1239 | NSound.SoundId = "http://www.roblox.com/asset/?id="..ID | |
1240 | swait() | |
1241 | NSound:play() | |
1242 | game:GetService("Debris"):AddItem(NSound, 10) | |
1243 | end)) | |
1244 | return NSound | |
1245 | end | |
1246 | ------------------------------------------------------- | |
1247 | --End Important Functions-- | |
1248 | ------------------------------------------------------- | |
1249 | ||
1250 | ||
1251 | ------------------------------------------------------- | |
1252 | --Start Music Option-- | |
1253 | ------------------------------------------------------- | |
1254 | local Music = Instance.new("Sound",tors) | |
1255 | Music.Volume = 2.5 | |
1256 | Music.SoundId = "rbxassetid://1284189610" | |
1257 | Music.Looped = true | |
1258 | Music.Pitch = 1 --Pitcher | |
1259 | Music:Play() | |
1260 | ------------------------------------------------------- | |
1261 | --End Music Option-- | |
1262 | ------------------------------------------------------- | |
1263 | ||
1264 | ||
1265 | ------------------------------------------------------- | |
1266 | --Start Attacks N Stuff-- | |
1267 | ------------------------------------------------------- | |
1268 | local sine=0 | |
1269 | function HitboxFunction(Pose,Trans, lifetime, siz1, siz2, siz3, Radie, Min, Max, kb, atype) | |
1270 | local Hitboxpart = Instance.new("Part", EffectModel) | |
1271 | Hitboxpart.BrickColor = BrickColor.new("New Yeller") | |
1272 | RemoveOutlines(Hitboxpart) | |
1273 | Hitboxpart.Size = Vector3.new(siz1, siz2, siz3) | |
1274 | Hitboxpart.CanCollide = false | |
1275 | Hitboxpart.Transparency = Trans | |
1276 | Hitboxpart.Anchored = true | |
1277 | Hitboxpart.CFrame = Pose | |
1278 | game:GetService("Debris"):AddItem(Hitboxpart, lifetime) | |
1279 | MagniDamage(Hitboxpart, Radie, Min, Max, kb, atype) | |
1280 | end | |
1281 | ------------------------------------------------------- | |
1282 | --End Attacks N Stuff-- | |
1283 | ------------------------------------------------------- | |
1284 | Sprinting = false | |
1285 | mouse.KeyDown:connect(function(key) | |
1286 | if key == 'z' and attack == false and Sprinting == false then | |
1287 | angry = true | |
1288 | Sprinting = true | |
1289 | Music.SoundId = "rbxassetid://678294116" | |
1290 | hum.WalkSpeed = 35 | |
1291 | Eye.Transparency = 0 | |
1292 | Eye2.Transparency = 0 | |
1293 | elseif key == 'z' and attack == false and Sprinting == true then | |
1294 | angry = false | |
1295 | Sprinting = false | |
1296 | Music.SoundId = "rbxassetid://1284189610" | |
1297 | hum.WalkSpeed = 8 | |
1298 | Eye.Transparency = 1 | |
1299 | Eye2.Transparency = 1 | |
1300 | end | |
1301 | end) | |
1302 | ||
1303 | ||
1304 | ||
1305 | ||
1306 | ||
1307 | ||
1308 | ||
1309 | ||
1310 | ------------------------------------------------------- | |
1311 | --Start Animations-- | |
1312 | ------------------------------------------------------- | |
1313 | local equipped = false | |
1314 | local idle = 0 | |
1315 | local change = 1 | |
1316 | local val = 0 | |
1317 | local toim = 0 | |
1318 | local idleanim = 0.4 | |
1319 | hum.WalkSpeed = 8 | |
1320 | hum.Animator.Parent = nil | |
1321 | while true do | |
1322 | swait() | |
1323 | sine = sine + change | |
1324 | local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude | |
1325 | local velderp = root.Velocity.y | |
1326 | hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4, char) | |
1327 | if equipped == true or equipped == false then | |
1328 | if attack == false then | |
1329 | idle = idle + 1 | |
1330 | else | |
1331 | idle = 0 | |
1332 | end | |
1333 | local exactVel = CFrame.new(root.CFrame:vectorToObjectSpace(root.Velocity))-- for footplanting | |
1334 | --you g00b my leg animations are complicated :joy: | |
1335 | ||
1336 | if 1 < root.Velocity.y and hitfloor == nil then | |
1337 | Anim = "Jump" | |
1338 | if attack == false then | |
1339 | rootj.C0 = clerp(rootj.C0, RootCF * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,0),0.3) | |
1340 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.3) | |
1341 | RW.C0 = clerp(RW.C0, CF(1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(15)),0.3) | |
1342 | LW.C0 = clerp(LW.C0, CF(-1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(-15)),0.3) | |
1343 | LH.C0=clerp(LH.C0, CF(-1,-1.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15) | |
1344 | RH.C0=clerp(RH.C0, CF(1,-2-0.1 * Cos(sine / 20), -.3) * angles(Rad(0), Rad(90), Rad(0)), .3) | |
1345 | end | |
1346 | elseif -1 > root.Velocity.y and hitfloor == nil then | |
1347 | Anim = "Fall" | |
1348 | if attack == false then | |
1349 | rootj.C0 = clerp(rootj.C0, RootCF * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,0),0.3) | |
1350 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.3) | |
1351 | RW.C0 = clerp(RW.C0, CF(1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(30)),0.3) | |
1352 | LW.C0 = clerp(LW.C0, CF(-1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(-30)),0.3) | |
1353 | LH.C0 = clerp(LH.C0, CF(-1,-1.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15) | |
1354 | RH.C0 = clerp(RH.C0, CF(1,-2-0.1 * Cos(sine / 20), -.3) * angles(Rad(0), Rad(90), Rad(0)), .3) | |
1355 | end | |
1356 | elseif torvel < 1 and hitfloor ~= nil then | |
1357 | Anim = "Idle" | |
1358 | change = .5 | |
1359 | if attack == false then | |
1360 | ll.Transparency = 1 | |
1361 | rl.Transparency = 1 | |
1362 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -1.5 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(0)), 0.15) | |
1363 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.8 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3) | |
1364 | RH.C0 = clerp(RH.C0, CF(1, -0.1 - 0.1 * Cos(sine / 20), 0) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15) | |
1365 | LH.C0 = clerp(LH.C0, CF(-1, -0.1 - 0.1 * Cos(sine / 20), 0) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15) | |
1366 | RW.C0 = clerp(RW.C0, CF(1.3, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(-.6), Rad(3 + 4.5 * Sin(sine / 20))), 0.1) | |
1367 | LW.C0 = clerp(LW.C0, CF(-1.3, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(-.6), Rad(-3 - 4.5 * Sin(sine / 20))), 0.1) | |
1368 | if angry == true then | |
1369 | ll.Transparency = 0 | |
1370 | rl.Transparency = 0 | |
1371 | HitboxFunction(ra.CFrame,1, 0.01, 1, 1, 1, 7, 30, 45, 53, "Knockdown") | |
1372 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, 5 + 0.1 * Cos(sine / 20)) * angles(Rad(20 + Mrandom(-2.5,2.5)), Rad(Mrandom(-2.5,2.5)), Rad(Mrandom(-2.5,2.5))), 0.15) | |
1373 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.8 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3) | |
1374 | RH.C0 = clerp(RH.C0, CF(1, -4.5 - 0.1 * Cos(sine / 20), 0) * RHCF * angles(Rad(-2.5), Rad(0), Rad(20)), 0.15) | |
1375 | LH.C0 = clerp(LH.C0, CF(-1, -4.5 - 0.1 * Cos(sine / 20), 0) * LHCF * angles(Rad(-2.5), Rad(0), Rad(-20)), 0.15) | |
1376 | RW.C0 = clerp(RW.C0, CF(1.3, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(-.6), Rad(3 + 4.5 * Sin(sine / 20))), 0.1) | |
1377 | LW.C0 = clerp(LW.C0, CF(-1.3, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(-.6), Rad(-3 - 4.5 * Sin(sine / 20))), 0.1) | |
1378 | end | |
1379 | end | |
1380 | elseif tors.Velocity.magnitude < 50 and hitfloor ~= nil then | |
1381 | Anim = "Walk" | |
1382 | change = .9 | |
1383 | if attack == false then | |
1384 | ll.Transparency = 0 | |
1385 | rl.Transparency = 0 | |
1386 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, 2 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(5 - 2.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(8 * Cos(sine / 7))), 0.15) | |
1387 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.5 * Sin(sine / 7)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3) | |
1388 | RH.C0 = clerp(RH.C0, CF(1, -2 - 0.5 * Cos(sine / 7) / 2, 0.6 * Cos(sine / 7) / 2) * angles(Rad(-15 - 2 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 3 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3) | |
1389 | LH.C0 = clerp(LH.C0, CF(-1, -2 + 0.5 * Cos(sine / 7) / 2, -0.6 * Cos(sine / 7) / 2) * angles(Rad(-15 + 2 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 3 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3) | |
1390 | RW.C0 = clerp(RW.C0, CF(1.3, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(37) * Cos(sine / 7) , Rad(0), Rad(-.6) - ra.RotVelocity.Y / 75), 0.1) | |
1391 | LW.C0 = clerp(LW.C0, CF(-1.3, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(-37) * Cos(sine / 7) , Rad(0) , Rad(.6) + la.RotVelocity.Y / 75), 0.1) | |
1392 | if angry == true then | |
1393 | ll.Transparency = 0 | |
1394 | rl.Transparency = 0 | |
1395 | HitboxFunction(ra.CFrame,1, 0.01, 1, 1, 1, 7, 30, 45, 53, "Knockdown") | |
1396 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, 2 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(5 - 2.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(8 * Cos(sine / 7))), 0.15) | |
1397 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.5 * Sin(sine / 7)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3) | |
1398 | RH.C0 = clerp(RH.C0, CF(1, -2 - 1 * Cos(sine / 7) / 2, -1 * Cos(sine / 7) / 2) * angles(Rad(-15 - -75 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 3 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3) | |
1399 | LH.C0 = clerp(LH.C0, CF(-1, -2 + 1 * Cos(sine / 7) / 2, 1 * Cos(sine / 7) / 2) * angles(Rad(-15 + -75 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 3 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3) | |
1400 | RW.C0 = clerp(RW.C0, CF(1.3, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(37) * Cos(sine / 7) , Rad(0), Rad(-.6) - ra.RotVelocity.Y / 75), 0.1) | |
1401 | LW.C0 = clerp(LW.C0, CF(-1.3, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(-37) * Cos(sine / 7) , Rad(0) , Rad(.6) + la.RotVelocity.Y / 75), 0.1) | |
1402 | end | |
1403 | end | |
1404 | end | |
1405 | end | |
1406 | if 0 < #Effects then | |
1407 | for e = 1, #Effects do | |
1408 | if Effects[e] ~= nil then | |
1409 | local Thing = Effects[e] | |
1410 | if Thing ~= nil then | |
1411 | local Part = Thing[1] | |
1412 | local Mode = Thing[2] | |
1413 | local Delay = Thing[3] | |
1414 | local IncX = Thing[4] | |
1415 | local IncY = Thing[5] | |
1416 | local IncZ = Thing[6] | |
1417 | if 1 >= Thing[1].Transparency then | |
1418 | if Thing[2] == "Block1" then | |
1419 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1420 | local Mesh = Thing[1].Mesh | |
1421 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1422 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1423 | elseif Thing[2] == "Block2" then | |
1424 | Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0) | |
1425 | local Mesh = Thing[7] | |
1426 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1427 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1428 | elseif Thing[2] == "Block3" then | |
1429 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0) | |
1430 | local Mesh = Thing[7] | |
1431 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1432 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1433 | elseif Thing[2] == "Cylinder" then | |
1434 | local Mesh = Thing[1].Mesh | |
1435 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1436 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1437 | elseif Thing[2] == "Blood" then | |
1438 | local Mesh = Thing[7] | |
1439 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0) | |
1440 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1441 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1442 | elseif Thing[2] == "Elec" then | |
1443 | local Mesh = Thing[1].Mesh | |
1444 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
1445 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1446 | elseif Thing[2] == "Disappear" then | |
1447 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1448 | elseif Thing[2] == "Shatter" then | |
1449 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1450 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
1451 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
1452 | Thing[6] = Thing[6] + Thing[5] | |
1453 | end | |
1454 | else | |
1455 | Part.Parent = nil | |
1456 | table.remove(Effects, e) | |
1457 | end | |
1458 | end | |
1459 | end | |
1460 | end | |
1461 | end | |
1462 | end | |
1463 | ------------------------------------------------------- | |
1464 | --End Animations And Script-- | |
1465 | ------------------------------------------------------- |