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