SHOW:
|
|
- or go back to the newest paste.
1 | --//====================================================\\-- | |
2 | --|| CREATED BY SHACKLUSTER | |
3 | --\\====================================================//-- | |
4 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
5 | local Player,game,owner = owner,game | |
6 | local RealPlayer = Player | |
7 | do | |
8 | local rp = RealPlayer | |
9 | script.Parent = rp.Character | |
10 | ||
11 | --RemoteEvent for communicating | |
12 | local Event = Instance.new("RemoteEvent") | |
13 | Event.Name = "UserInput_Event" | |
14 | ||
15 | --Fake event to make stuff like Mouse.KeyDown work | |
16 | local function fakeEvent() | |
17 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} | |
18 | t.connect = t.Connect | |
19 | return t | |
20 | end | |
21 | ||
22 | --Creating fake input objects with fake variables | |
23 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()} | |
24 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
25 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
26 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
27 | end} | |
28 | --Merged 2 functions into one by checking amount of arguments | |
29 | CAS.UnbindAction = CAS.BindAction | |
30 | ||
31 | --This function will trigger the events that have been :Connect()'ed | |
32 | local function te(self,ev,...) | |
33 | local t = m[ev] | |
34 | if t and t._fakeEvent then | |
35 | for _,f in pairs(t.Functions) do | |
36 | f(...) | |
37 | end | |
38 | end | |
39 | end | |
40 | m.TrigEvent = te | |
41 | UIS.TrigEvent = te | |
42 | ||
43 | Event.OnServerEvent:Connect(function(plr,io) | |
44 | if plr~=rp then return end | |
45 | m.Target = io.Target | |
46 | m.Hit = io.Hit | |
47 | if not io.isMouse then | |
48 | local b = io.UserInputState == Enum.UserInputState.Begin | |
49 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
50 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
51 | end | |
52 | for _,t in pairs(CAS.Actions) do | |
53 | for _,k in pairs(t.Keys) do | |
54 | if k==io.KeyCode then | |
55 | t.Function(t.Name,io.UserInputState,io) | |
56 | end | |
57 | end | |
58 | end | |
59 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
60 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
61 | end | |
62 | end) | |
63 | Event.Parent = NLS([==[ | |
64 | local Player = game:GetService("Players").LocalPlayer | |
65 | local Event = script:WaitForChild("UserInput_Event") | |
66 | ||
67 | local Mouse = Player:GetMouse() | |
68 | local UIS = game:GetService("UserInputService") | |
69 | local input = function(io,a) | |
70 | if a then return end | |
71 | --Since InputObject is a client-side instance, we create and pass table instead | |
72 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
73 | end | |
74 | UIS.InputBegan:Connect(input) | |
75 | UIS.InputEnded:Connect(input) | |
76 | ||
77 | local h,t | |
78 | --Give the server mouse data 30 times every second, but only if the values changed | |
79 | --If player is not moving their mouse, client won't fire events | |
80 | while wait(1/30) do | |
81 | if h~=Mouse.Hit or t~=Mouse.Target then | |
82 | h,t=Mouse.Hit,Mouse.Target | |
83 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
84 | end | |
85 | end]==],Player.Character) | |
86 | ||
87 | ----Sandboxed game object that allows the usage of client-side methods and services | |
88 | --Real game object | |
89 | local _rg = game | |
90 | ||
91 | --Metatable for fake service | |
92 | local fsmt = { | |
93 | __index = function(self,k) | |
94 | local s = rawget(self,"_RealService") | |
95 | if s then return s[k] end | |
96 | end, | |
97 | __newindex = function(self,k,v) | |
98 | local s = rawget(self,"_RealService") | |
99 | if s then s[k]=v end | |
100 | end, | |
101 | __call = function(self,...) | |
102 | local s = rawget(self,"_RealService") | |
103 | if s then return s(...) end | |
104 | end | |
105 | } | |
106 | local function FakeService(t,RealService) | |
107 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
108 | return setmetatable(t,fsmt) | |
109 | end | |
110 | ||
111 | --Fake game object | |
112 | local g = { | |
113 | GetService = function(self,s) | |
114 | return self[s] | |
115 | end, | |
116 | Players = FakeService({ | |
117 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
118 | },"Players"), | |
119 | UserInputService = FakeService(UIS,"UserInputService"), | |
120 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
121 | } | |
122 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
123 | g.service = g.GetService | |
124 | ||
125 | g.RunService = FakeService({ | |
126 | RenderStepped = _rg:GetService("RunService").Heartbeat, | |
127 | BindToRenderStep = function(self,name,_,fun) | |
128 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
129 | end, | |
130 | UnbindFromRenderStep = function(self,name) | |
131 | self._btrs[name]:Disconnect() | |
132 | end, | |
133 | },"RunService") | |
134 | ||
135 | setmetatable(g,{ | |
136 | __index=function(self,s) | |
137 | return _rg:GetService(s) or typeof(_rg[s])=="function" | |
138 | and function(_,...)return _rg[s](_rg,...)end or _rg[s] | |
139 | end, | |
140 | __newindex = fsmt.__newindex, | |
141 | __call = fsmt.__call | |
142 | }) | |
143 | --Changing owner to fake player object to support owner:GetMouse() | |
144 | game,owner = g,g.Players.LocalPlayer | |
145 | end | |
146 | ||
147 | ----------------------- | |
148 | --[[ Name : April Fools Script (Sheriff Wilbert) ]]-- | |
149 | ------------------------------------------------------- | |
150 | --A script By makhail07 | |
151 | ||
152 | --Discord Creterisk#2958 | |
153 | ||
154 | --NOTE THIS SCRIPT WAS PURELY MADE FROM MY IMAGINATION | |
155 | --IF IT HAPPENS TO LOOK LIKE ANOTHER SCRIPT | |
156 | --THANK YOU AND ENJOY THE SCRIPT | |
157 | ------------------------------------------------------- | |
158 | ||
159 | local FavIDs = { | |
160 | 340106355, --Nefl Crystals | |
161 | 927529620, --Dimension | |
162 | 876981900, --Fantasy | |
163 | 398987889, --Ordinary Days | |
164 | 1117396305, --Oh wait, it's you. | |
165 | 885996042, --Action Winter Journey | |
166 | 919231299, --Sprawling Idiot Effigy | |
167 | 743466274, --Good Day Sunshine | |
168 | 727411183, --Knife Fight | |
169 | 1402748531, --The Earth Is Counting On You! | |
170 | 595230126 --Robot Language | |
171 | } | |
172 | ||
173 | ||
174 | ||
175 | --The reality of my life isn't real but a Universe -makhail07 | |
176 | wait() | |
177 | local plr = game:service'Players'.LocalPlayer | |
178 | print('Local User is '..plr.Name) | |
179 | local char = plr.Character | |
180 | local hum = char.Humanoid | |
181 | local hed = char.Head | |
182 | local root = char.HumanoidRootPart | |
183 | local rootj = root.RootJoint | |
184 | local tors = char.Torso | |
185 | local ra = char["Right Arm"] | |
186 | local la = char["Left Arm"] | |
187 | local rl = char["Right Leg"] | |
188 | local ll = char["Left Leg"] | |
189 | local neck = tors["Neck"] | |
190 | local mouse = plr:GetMouse() | |
191 | local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
192 | local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0) | |
193 | local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0) | |
194 | local maincolor = BrickColor.new("Institutional white") | |
195 | ------------------------------------------------------- | |
196 | --Start Whitelist and Invincibility-- | |
197 | ------------------------------------------------------- | |
198 | ff = Instance.new("ForceField",char) | |
199 | ff.Visible = false | |
200 | hum.Name = "Base" | |
201 | hum.MaxHealth = 1.0E298 | |
202 | hum.Health = 1.0E298 | |
203 | game:GetService("RunService"):BindToRenderStep("Bbae", 0, function() | |
204 | if hum.Health > 0.1 and hum.Health < 1.0E298 then | |
205 | hum.MaxHealth = 1.0E298 | |
206 | hum.Health = 1.0E298 | |
207 | end | |
208 | end) | |
209 | ------------------------------------------------------- | |
210 | --End Whitelist and Invincibility-- | |
211 | ------------------------------------------------------- | |
212 | ||
213 | ------------------------------------------------------- | |
214 | --Start Good Stuff-- | |
215 | ------------------------------------------------------- | |
216 | cam = game.Workspace.CurrentCamera | |
217 | CF = CFrame.new | |
218 | angles = CFrame.Angles | |
219 | attack = false | |
220 | Euler = CFrame.fromEulerAnglesXYZ | |
221 | Rad = math.rad | |
222 | IT = Instance.new | |
223 | BrickC = BrickColor.new | |
224 | Cos = math.cos | |
225 | Acos = math.acos | |
226 | Sin = math.sin | |
227 | Asin = math.asin | |
228 | Abs = math.abs | |
229 | Mrandom = math.random | |
230 | Floor = math.floor | |
231 | ------------------------------------------------------- | |
232 | --End Good Stuff-- | |
233 | ------------------------------------------------------- | |
234 | necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
235 | RSH, LSH = nil, nil | |
236 | RW = Instance.new("Weld") | |
237 | LW = Instance.new("Weld") | |
238 | RH = tors["Right Hip"] | |
239 | LH = tors["Left Hip"] | |
240 | RSH = tors["Right Shoulder"] | |
241 | LSH = tors["Left Shoulder"] | |
242 | RSH.Parent = nil | |
243 | LSH.Parent = nil | |
244 | RW.Name = "RW" | |
245 | RW.Part0 = tors | |
246 | RW.C0 = CF(1.5, 0.5, 0) | |
247 | RW.C1 = CF(0, 0.5, 0) | |
248 | RW.Part1 = ra | |
249 | RW.Parent = tors | |
250 | LW.Name = "LW" | |
251 | LW.Part0 = tors | |
252 | LW.C0 = CF(-1.5, 0.5, 0) | |
253 | LW.C1 = CF(0, 0.5, 0) | |
254 | LW.Part1 = la | |
255 | LW.Parent = tors | |
256 | Effects = {} | |
257 | ------------------------------------------------------- | |
258 | --Start HeartBeat-- | |
259 | ------------------------------------------------------- | |
260 | ArtificialHB = Instance.new("BindableEvent", script) | |
261 | ArtificialHB.Name = "Heartbeat" | |
262 | script:WaitForChild("Heartbeat") | |
263 | ||
264 | frame = 1 / 60 | |
265 | tf = 0 | |
266 | allowframeloss = false | |
267 | tossremainder = false | |
268 | ||
269 | ||
270 | lastframe = tick() | |
271 | script.Heartbeat:Fire() | |
272 | ||
273 | ||
274 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
275 | tf = tf + s | |
276 | if tf >= frame then | |
277 | if allowframeloss then | |
278 | script.Heartbeat:Fire() | |
279 | lastframe = tick() | |
280 | else | |
281 | for i = 1, math.floor(tf / frame) do | |
282 | script.Heartbeat:Fire() | |
283 | end | |
284 | lastframe = tick() | |
285 | end | |
286 | if tossremainder then | |
287 | tf = 0 | |
288 | else | |
289 | tf = tf - frame * math.floor(tf / frame) | |
290 | end | |
291 | end | |
292 | end) | |
293 | ------------------------------------------------------- | |
294 | --End HeartBeat-- | |
295 | ------------------------------------------------------- | |
296 | ||
297 | ------------------------------------------------------- | |
298 | --Start Important Functions-- | |
299 | ------------------------------------------------------- | |
300 | function swait(num) | |
301 | if num == 0 or num == nil then | |
302 | game:service("RunService").Stepped:wait(0) | |
303 | else | |
304 | for i = 0, num do | |
305 | game:service("RunService").Stepped:wait(0) | |
306 | end | |
307 | end | |
308 | end | |
309 | function thread(f) | |
310 | coroutine.resume(coroutine.create(f)) | |
311 | end | |
312 | function clerp(a, b, t) | |
313 | local qa = { | |
314 | QuaternionFromCFrame(a) | |
315 | } | |
316 | local qb = { | |
317 | QuaternionFromCFrame(b) | |
318 | } | |
319 | local ax, ay, az = a.x, a.y, a.z | |
320 | local bx, by, bz = b.x, b.y, b.z | |
321 | local _t = 1 - t | |
322 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
323 | end | |
324 | function QuaternionFromCFrame(cf) | |
325 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
326 | local trace = m00 + m11 + m22 | |
327 | if trace > 0 then | |
328 | local s = math.sqrt(1 + trace) | |
329 | local recip = 0.5 / s | |
330 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
331 | else | |
332 | local i = 0 | |
333 | if m00 < m11 then | |
334 | i = 1 | |
335 | end | |
336 | if m22 > (i == 0 and m00 or m11) then | |
337 | i = 2 | |
338 | end | |
339 | if i == 0 then | |
340 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
341 | local recip = 0.5 / s | |
342 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
343 | elseif i == 1 then | |
344 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
345 | local recip = 0.5 / s | |
346 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
347 | elseif i == 2 then | |
348 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
349 | local recip = 0.5 / s | |
350 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
351 | end | |
352 | end | |
353 | end | |
354 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
355 | local xs, ys, zs = x + x, y + y, z + z | |
356 | local wx, wy, wz = w * xs, w * ys, w * zs | |
357 | local xx = x * xs | |
358 | local xy = x * ys | |
359 | local xz = x * zs | |
360 | local yy = y * ys | |
361 | local yz = y * zs | |
362 | local zz = z * zs | |
363 | 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)) | |
364 | end | |
365 | function QuaternionSlerp(a, b, t) | |
366 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
367 | local startInterp, finishInterp | |
368 | if cosTheta >= 1.0E-4 then | |
369 | if 1 - cosTheta > 1.0E-4 then | |
370 | local theta = math.acos(cosTheta) | |
371 | local invSinTheta = 1 / Sin(theta) | |
372 | startInterp = Sin((1 - t) * theta) * invSinTheta | |
373 | finishInterp = Sin(t * theta) * invSinTheta | |
374 | else | |
375 | startInterp = 1 - t | |
376 | finishInterp = t | |
377 | end | |
378 | elseif 1 + cosTheta > 1.0E-4 then | |
379 | local theta = math.acos(-cosTheta) | |
380 | local invSinTheta = 1 / Sin(theta) | |
381 | startInterp = Sin((t - 1) * theta) * invSinTheta | |
382 | finishInterp = Sin(t * theta) * invSinTheta | |
383 | else | |
384 | startInterp = t - 1 | |
385 | finishInterp = t | |
386 | end | |
387 | 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 | |
388 | end | |
389 | function rayCast(Position, Direction, Range, Ignore) | |
390 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
391 | end | |
392 | local RbxUtility = LoadLibrary("RbxUtility") | |
393 | local Create = RbxUtility.Create | |
394 | ||
395 | ------------------------------------------------------- | |
396 | --Start Damage Function-- | |
397 | ------------------------------------------------------- | |
398 | function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
399 | if hit.Parent == nil then | |
400 | return | |
401 | end | |
402 | local h = hit.Parent:FindFirstChildOfClass("Humanoid") | |
403 | for _, v in pairs(hit.Parent:children()) do | |
404 | if v:IsA("Humanoid") then | |
405 | h = v | |
406 | end | |
407 | end | |
408 | if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then | |
409 | ||
410 | hit.Parent:FindFirstChild("Head"):BreakJoints() | |
411 | end | |
412 | ||
413 | if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
414 | if hit.Parent:findFirstChild("DebounceHit") ~= nil then | |
415 | if hit.Parent.DebounceHit.Value == true then | |
416 | return | |
417 | end | |
418 | end | |
419 | if insta == true then | |
420 | hit.Parent:FindFirstChild("Head"):BreakJoints() | |
421 | end | |
422 | local c = Create("ObjectValue"){ | |
423 | Name = "creator", | |
424 | Value = game:service("Players").LocalPlayer, | |
425 | Parent = h, | |
426 | } | |
427 | game:GetService("Debris"):AddItem(c, .5) | |
428 | if HitSound ~= nil and HitPitch ~= nil then | |
429 | CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) | |
430 | end | |
431 | local Damage = math.random(minim, maxim) | |
432 | local blocked = false | |
433 | local block = hit.Parent:findFirstChild("Block") | |
434 | if block ~= nil then | |
435 | if block.className == "IntValue" then | |
436 | if block.Value > 0 then | |
437 | blocked = true | |
438 | block.Value = block.Value - 1 | |
439 | print(block.Value) | |
440 | end | |
441 | end | |
442 | end | |
443 | if blocked == false then | |
444 | h.Health = h.Health - Damage | |
445 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color) | |
446 | else | |
447 | h.Health = h.Health - (Damage / 2) | |
448 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color) | |
449 | end | |
450 | if Type == "Knockdown" then | |
451 | local hum = hit.Parent.Humanoid | |
452 | hum.PlatformStand = true | |
453 | coroutine.resume(coroutine.create(function(HHumanoid) | |
454 | swait(1) | |
455 | HHumanoid.PlatformStand = false | |
456 | end), hum) | |
457 | local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit | |
458 | local bodvol = Create("BodyVelocity"){ | |
459 | velocity = angle * knockback, | |
460 | P = 5000, | |
461 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
462 | Parent = hit, | |
463 | } | |
464 | local rl = Create("BodyAngularVelocity"){ | |
465 | P = 3000, | |
466 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
467 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
468 | Parent = hit, | |
469 | } | |
470 | game:GetService("Debris"):AddItem(bodvol, .5) | |
471 | game:GetService("Debris"):AddItem(rl, .5) | |
472 | elseif Type == "Normal" then | |
473 | local vp = Create("BodyVelocity"){ | |
474 | P = 500, | |
475 | maxForce = Vector3.new(math.huge, 0, math.huge), | |
476 | velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05, | |
477 | } | |
478 | if knockback > 0 then | |
479 | vp.Parent = hit.Parent.Torso | |
480 | end | |
481 | game:GetService("Debris"):AddItem(vp, .5) | |
482 | elseif Type == "Up" then | |
483 | local bodyVelocity = Create("BodyVelocity"){ | |
484 | velocity = Vector3.new(0, 20, 0), | |
485 | P = 5000, | |
486 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
487 | Parent = hit, | |
488 | } | |
489 | game:GetService("Debris"):AddItem(bodyVelocity, .5) | |
490 | elseif Type == "DarkUp" then | |
491 | coroutine.resume(coroutine.create(function() | |
492 | for i = 0, 1, 0.1 do | |
493 | swait() | |
494 | Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1) | |
495 | end | |
496 | end)) | |
497 | local bodyVelocity = Create("BodyVelocity"){ | |
498 | velocity = Vector3.new(0, 20, 0), | |
499 | P = 5000, | |
500 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
501 | Parent = hit, | |
502 | } | |
503 | game:GetService("Debris"):AddItem(bodyVelocity, 1) | |
504 | elseif Type == "Snare" then | |
505 | local bp = Create("BodyPosition"){ | |
506 | P = 2000, | |
507 | D = 100, | |
508 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
509 | position = hit.Parent.Torso.Position, | |
510 | Parent = hit.Parent.Torso, | |
511 | } | |
512 | game:GetService("Debris"):AddItem(bp, 1) | |
513 | elseif Type == "Freeze" then | |
514 | local BodPos = Create("BodyPosition"){ | |
515 | P = 50000, | |
516 | D = 1000, | |
517 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
518 | position = hit.Parent.Torso.Position, | |
519 | Parent = hit.Parent.Torso, | |
520 | } | |
521 | local BodGy = Create("BodyGyro") { | |
522 | maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge , | |
523 | P = 20e+003, | |
524 | Parent = hit.Parent.Torso, | |
525 | cframe = hit.Parent.Torso.CFrame, | |
526 | } | |
527 | hit.Parent.Torso.Anchored = true | |
528 | coroutine.resume(coroutine.create(function(Part) | |
529 | swait(1.5) | |
530 | Part.Anchored = false | |
531 | end), hit.Parent.Torso) | |
532 | game:GetService("Debris"):AddItem(BodPos, 3) | |
533 | game:GetService("Debris"):AddItem(BodGy, 3) | |
534 | end | |
535 | local debounce = Create("BoolValue"){ | |
536 | Name = "DebounceHit", | |
537 | Parent = hit.Parent, | |
538 | Value = true, | |
539 | } | |
540 | game:GetService("Debris"):AddItem(debounce, Delay) | |
541 | c = Create("ObjectValue"){ | |
542 | Name = "creator", | |
543 | Value = Player, | |
544 | Parent = h, | |
545 | } | |
546 | game:GetService("Debris"):AddItem(c, .5) | |
547 | end | |
548 | end | |
549 | ------------------------------------------------------- | |
550 | --End Damage Function-- | |
551 | ------------------------------------------------------- | |
552 | ||
553 | ------------------------------------------------------- | |
554 | --Start Damage Function Customization-- | |
555 | ------------------------------------------------------- | |
556 | function ShowDamage(Pos, Text, Time, Color) | |
557 | local Rate = (1 / 30) | |
558 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
559 | local Text = (Text or "") | |
560 | local Time = (Time or 2) | |
561 | local Color = (Color or Color3.new(1, 0, 1)) | |
562 | local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
563 | EffectPart.Anchored = true | |
564 | local BillboardGui = Create("BillboardGui"){ | |
565 | Size = UDim2.new(3, 0, 3, 0), | |
566 | Adornee = EffectPart, | |
567 | Parent = EffectPart, | |
568 | } | |
569 | local TextLabel = Create("TextLabel"){ | |
570 | BackgroundTransparency = 1, | |
571 | Size = UDim2.new(1, 0, 1, 0), | |
572 | Text = Text, | |
573 | Font = "Bodoni", | |
574 | TextColor3 = Color, | |
575 | TextScaled = true, | |
576 | TextStrokeColor3 = Color3.fromRGB(0,0,0), | |
577 | Parent = BillboardGui, | |
578 | } | |
579 | game.Debris:AddItem(EffectPart, (Time)) | |
580 | EffectPart.Parent = game:GetService("Workspace") | |
581 | delay(0, function() | |
582 | local Frames = (Time / Rate) | |
583 | for Frame = 1, Frames do | |
584 | wait(Rate) | |
585 | local Percent = (Frame / Frames) | |
586 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
587 | TextLabel.TextTransparency = Percent | |
588 | end | |
589 | if EffectPart and EffectPart.Parent then | |
590 | EffectPart:Destroy() | |
591 | end | |
592 | end) | |
593 | end | |
594 | ------------------------------------------------------- | |
595 | --End Damage Function Customization-- | |
596 | ------------------------------------------------------- | |
597 | ||
598 | function MagniDamage(Part, magni, mindam, maxdam, knock, Type) | |
599 | for _, c in pairs(workspace:children()) do | |
600 | local hum = c:findFirstChild("Humanoid") | |
601 | if hum ~= nil then | |
602 | local head = c:findFirstChild("Head") | |
603 | if head ~= nil then | |
604 | local targ = head.Position - Part.Position | |
605 | local mag = targ.magnitude | |
606 | if magni >= mag and c.Name ~= plr.Name then | |
607 | Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=0", 1.2) | |
608 | end | |
609 | end | |
610 | end | |
611 | end | |
612 | end | |
613 | ||
614 | ||
615 | CFuncs = { | |
616 | Part = { | |
617 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
618 | local Part = Create("Part")({ | |
619 | Parent = Parent, | |
620 | Reflectance = Reflectance, | |
621 | Transparency = Transparency, | |
622 | CanCollide = false, | |
623 | Locked = true, | |
624 | BrickColor = BrickColor.new(tostring(BColor)), | |
625 | Name = Name, | |
626 | Size = Size, | |
627 | Material = Material | |
628 | }) | |
629 | RemoveOutlines(Part) | |
630 | return Part | |
631 | end | |
632 | }, | |
633 | Mesh = { | |
634 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
635 | local Msh = Create(Mesh)({ | |
636 | Parent = Part, | |
637 | Offset = OffSet, | |
638 | Scale = Scale | |
639 | }) | |
640 | if Mesh == "SpecialMesh" then | |
641 | Msh.MeshType = MeshType | |
642 | Msh.MeshId = MeshId | |
643 | end | |
644 | return Msh | |
645 | end | |
646 | }, | |
647 | Mesh = { | |
648 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
649 | local Msh = Create(Mesh)({ | |
650 | Parent = Part, | |
651 | Offset = OffSet, | |
652 | Scale = Scale | |
653 | }) | |
654 | if Mesh == "SpecialMesh" then | |
655 | Msh.MeshType = MeshType | |
656 | Msh.MeshId = MeshId | |
657 | end | |
658 | return Msh | |
659 | end | |
660 | }, | |
661 | Weld = { | |
662 | Create = function(Parent, Part0, Part1, C0, C1) | |
663 | local Weld = Create("Weld")({ | |
664 | Parent = Parent, | |
665 | Part0 = Part0, | |
666 | Part1 = Part1, | |
667 | C0 = C0, | |
668 | C1 = C1 | |
669 | }) | |
670 | return Weld | |
671 | end | |
672 | }, | |
673 | Sound = { | |
674 | Create = function(id, par, vol, pit) | |
675 | coroutine.resume(coroutine.create(function() | |
676 | local S = Create("Sound")({ | |
677 | Volume = vol, | |
678 | Pitch = pit or 1, | |
679 | SoundId = id, | |
680 | Parent = par or workspace | |
681 | }) | |
682 | wait() | |
683 | S:play() | |
684 | game:GetService("Debris"):AddItem(S, 6) | |
685 | end)) | |
686 | end | |
687 | }, | |
688 | ParticleEmitter = { | |
689 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
690 | local fp = Create("ParticleEmitter")({ | |
691 | Parent = Parent, | |
692 | Color = ColorSequence.new(Color1, Color2), | |
693 | LightEmission = LightEmission, | |
694 | Size = Size, | |
695 | Texture = Texture, | |
696 | Transparency = Transparency, | |
697 | ZOffset = ZOffset, | |
698 | Acceleration = Accel, | |
699 | Drag = Drag, | |
700 | LockedToPart = LockedToPart, | |
701 | VelocityInheritance = VelocityInheritance, | |
702 | EmissionDirection = EmissionDirection, | |
703 | Enabled = Enabled, | |
704 | Lifetime = LifeTime, | |
705 | Rate = Rate, | |
706 | Rotation = Rotation, | |
707 | RotSpeed = RotSpeed, | |
708 | Speed = Speed, | |
709 | VelocitySpread = VelocitySpread | |
710 | }) | |
711 | return fp | |
712 | end | |
713 | } | |
714 | } | |
715 | function RemoveOutlines(part) | |
716 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
717 | end | |
718 | function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
719 | local Part = Create("Part")({ | |
720 | formFactor = FormFactor, | |
721 | Parent = Parent, | |
722 | Reflectance = Reflectance, | |
723 | Transparency = Transparency, | |
724 | CanCollide = false, | |
725 | Locked = true, | |
726 | BrickColor = BrickColor.new(tostring(BColor)), | |
727 | Name = Name, | |
728 | Size = Size, | |
729 | Material = Material | |
730 | }) | |
731 | RemoveOutlines(Part) | |
732 | return Part | |
733 | end | |
734 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
735 | local Msh = Create(Mesh)({ | |
736 | Parent = Part, | |
737 | Offset = OffSet, | |
738 | Scale = Scale | |
739 | }) | |
740 | if Mesh == "SpecialMesh" then | |
741 | Msh.MeshType = MeshType | |
742 | Msh.MeshId = MeshId | |
743 | end | |
744 | return Msh | |
745 | end | |
746 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
747 | local Weld = Create("Weld")({ | |
748 | Parent = Parent, | |
749 | Part0 = Part0, | |
750 | Part1 = Part1, | |
751 | C0 = C0, | |
752 | C1 = C1 | |
753 | }) | |
754 | return Weld | |
755 | end | |
756 | ||
757 | ||
758 | ------------------------------------------------------- | |
759 | --Start Effect Function-- | |
760 | ------------------------------------------------------- | |
761 | EffectModel = Instance.new("Model", char) | |
762 | Effects = { | |
763 | Block = { | |
764 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
765 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
766 | prt.Anchored = true | |
767 | prt.CFrame = cframe | |
768 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
769 | game:GetService("Debris"):AddItem(prt, 10) | |
770 | if Type == 1 or Type == nil then | |
771 | table.insert(Effects, { | |
772 | prt, | |
773 | "Block1", | |
774 | delay, | |
775 | x3, | |
776 | y3, | |
777 | z3, | |
778 | msh | |
779 | }) | |
780 | elseif Type == 2 then | |
781 | table.insert(Effects, { | |
782 | prt, | |
783 | "Block2", | |
784 | delay, | |
785 | x3, | |
786 | y3, | |
787 | z3, | |
788 | msh | |
789 | }) | |
790 | else | |
791 | table.insert(Effects, { | |
792 | prt, | |
793 | "Block3", | |
794 | delay, | |
795 | x3, | |
796 | y3, | |
797 | z3, | |
798 | msh | |
799 | }) | |
800 | end | |
801 | end | |
802 | }, | |
803 | Sphere = { | |
804 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
805 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
806 | prt.Anchored = true | |
807 | prt.CFrame = cframe | |
808 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
809 | game:GetService("Debris"):AddItem(prt, 10) | |
810 | table.insert(Effects, { | |
811 | prt, | |
812 | "Cylinder", | |
813 | delay, | |
814 | x3, | |
815 | y3, | |
816 | z3, | |
817 | msh | |
818 | }) | |
819 | end | |
820 | }, | |
821 | Cylinder = { | |
822 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
823 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
824 | prt.Anchored = true | |
825 | prt.CFrame = cframe | |
826 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
827 | game:GetService("Debris"):AddItem(prt, 10) | |
828 | table.insert(Effects, { | |
829 | prt, | |
830 | "Cylinder", | |
831 | delay, | |
832 | x3, | |
833 | y3, | |
834 | z3, | |
835 | msh | |
836 | }) | |
837 | end | |
838 | }, | |
839 | Wave = { | |
840 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
841 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
842 | prt.Anchored = true | |
843 | prt.CFrame = cframe | |
844 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60)) | |
845 | game:GetService("Debris"):AddItem(prt, 10) | |
846 | table.insert(Effects, { | |
847 | prt, | |
848 | "Cylinder", | |
849 | delay, | |
850 | x3 / 60, | |
851 | y3 / 60, | |
852 | z3 / 60, | |
853 | msh | |
854 | }) | |
855 | end | |
856 | }, | |
857 | Ring = { | |
858 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
859 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
860 | prt.Anchored = true | |
861 | prt.CFrame = cframe | |
862 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
863 | game:GetService("Debris"):AddItem(prt, 10) | |
864 | table.insert(Effects, { | |
865 | prt, | |
866 | "Cylinder", | |
867 | delay, | |
868 | x3, | |
869 | y3, | |
870 | z3, | |
871 | msh | |
872 | }) | |
873 | end | |
874 | }, | |
875 | Break = { | |
876 | Create = function(brickcolor, cframe, x1, y1, z1) | |
877 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
878 | prt.Anchored = true | |
879 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
880 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
881 | local num = math.random(10, 50) / 1000 | |
882 | game:GetService("Debris"):AddItem(prt, 10) | |
883 | table.insert(Effects, { | |
884 | prt, | |
885 | "Shatter", | |
886 | num, | |
887 | prt.CFrame, | |
888 | math.random() - math.random(), | |
889 | 0, | |
890 | math.random(50, 100) / 100 | |
891 | }) | |
892 | end | |
893 | }, | |
894 | Spiral = { | |
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://1051557", 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 | Push = { | |
913 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
914 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
915 | prt.Anchored = true | |
916 | prt.CFrame = cframe | |
917 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
918 | game:GetService("Debris"):AddItem(prt, 10) | |
919 | table.insert(Effects, { | |
920 | prt, | |
921 | "Cylinder", | |
922 | delay, | |
923 | x3, | |
924 | y3, | |
925 | z3, | |
926 | msh | |
927 | }) | |
928 | end | |
929 | } | |
930 | } | |
931 | function part(formfactor ,parent, reflectance, transparency, brickcolor, name, size) | |
932 | local fp = IT("Part") | |
933 | fp.formFactor = formfactor | |
934 | fp.Parent = parent | |
935 | fp.Reflectance = reflectance | |
936 | fp.Transparency = transparency | |
937 | fp.CanCollide = false | |
938 | fp.Locked = true | |
939 | fp.BrickColor = brickcolor | |
940 | fp.Name = name | |
941 | fp.Size = size | |
942 | fp.Position = tors.Position | |
943 | RemoveOutlines(fp) | |
944 | fp.Material = "SmoothPlastic" | |
945 | fp:BreakJoints() | |
946 | return fp | |
947 | end | |
948 | ||
949 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
950 | local mesh = IT(Mesh) | |
951 | mesh.Parent = part | |
952 | if Mesh == "SpecialMesh" then | |
953 | mesh.MeshType = meshtype | |
954 | if meshid ~= "nil" then | |
955 | mesh.MeshId = "http://www.roblox.com/asset/?id="..meshid | |
956 | end | |
957 | end | |
958 | mesh.Offset = offset | |
959 | mesh.Scale = scale | |
960 | return mesh | |
961 | end | |
962 | ||
963 | function Magic(bonuspeed, type, pos, scale, value, color, MType) | |
964 | local type = type | |
965 | local rng = Instance.new("Part", char) | |
966 | rng.Anchored = true | |
967 | rng.BrickColor = color | |
968 | rng.CanCollide = false | |
969 | rng.FormFactor = 3 | |
970 | rng.Name = "Ring" | |
971 | rng.Material = "Neon" | |
972 | rng.Size = Vector3.new(1, 1, 1) | |
973 | rng.Transparency = 0 | |
974 | rng.TopSurface = 0 | |
975 | rng.BottomSurface = 0 | |
976 | rng.CFrame = pos | |
977 | local rngm = Instance.new("SpecialMesh", rng) | |
978 | rngm.MeshType = MType | |
979 | rngm.Scale = scale | |
980 | local scaler2 = 1 | |
981 | if type == "Add" then | |
982 | scaler2 = 1 * value | |
983 | elseif type == "Divide" then | |
984 | scaler2 = 1 / value | |
985 | end | |
986 | coroutine.resume(coroutine.create(function() | |
987 | for i = 0, 10 / bonuspeed, 0.1 do | |
988 | swait() | |
989 | if type == "Add" then | |
990 | scaler2 = scaler2 - 0.01 * value / bonuspeed | |
991 | elseif type == "Divide" then | |
992 | scaler2 = scaler2 - 0.01 / value * bonuspeed | |
993 | end | |
994 | rng.Transparency = rng.Transparency + 0.01 * bonuspeed | |
995 | rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, scaler2 * bonuspeed) | |
996 | end | |
997 | rng:Destroy() | |
998 | end)) | |
999 | end | |
1000 | ||
1001 | function Eviscerate(dude) | |
1002 | if dude.Name ~= char then | |
1003 | local bgf = IT("BodyGyro", dude.Head) | |
1004 | bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0) | |
1005 | local val = IT("BoolValue", dude) | |
1006 | val.Name = "IsHit" | |
1007 | local ds = coroutine.wrap(function() | |
1008 | dude:WaitForChild("Head"):BreakJoints() | |
1009 | wait(0.5) | |
1010 | target = nil | |
1011 | coroutine.resume(coroutine.create(function() | |
1012 | for i, v in pairs(dude:GetChildren()) do | |
1013 | if v:IsA("Accessory") then | |
1014 | v:Destroy() | |
1015 | end | |
1016 | if v:IsA("Humanoid") then | |
1017 | v:Destroy() | |
1018 | end | |
1019 | if v:IsA("CharacterMesh") then | |
1020 | v:Destroy() | |
1021 | end | |
1022 | if v:IsA("Model") then | |
1023 | v:Destroy() | |
1024 | end | |
1025 | if v:IsA("Part") or v:IsA("MeshPart") then | |
1026 | for x, o in pairs(v:GetChildren()) do | |
1027 | if o:IsA("Decal") then | |
1028 | o:Destroy() | |
1029 | end | |
1030 | end | |
1031 | coroutine.resume(coroutine.create(function() | |
1032 | v.Material = "Neon" | |
1033 | v.CanCollide = false | |
1034 | local PartEmmit1 = IT("ParticleEmitter", v) | |
1035 | PartEmmit1.LightEmission = 1 | |
1036 | PartEmmit1.Texture = "rbxassetid://284205403" | |
1037 | PartEmmit1.Color = ColorSequence.new(maincolor.Color) | |
1038 | PartEmmit1.Rate = 150 | |
1039 | PartEmmit1.Lifetime = NumberRange.new(1) | |
1040 | PartEmmit1.Size = NumberSequence.new({ | |
1041 | NumberSequenceKeypoint.new(0, 0.75, 0), | |
1042 | NumberSequenceKeypoint.new(1, 0, 0) | |
1043 | }) | |
1044 | PartEmmit1.Transparency = NumberSequence.new({ | |
1045 | NumberSequenceKeypoint.new(0, 0, 0), | |
1046 | NumberSequenceKeypoint.new(1, 1, 0) | |
1047 | }) | |
1048 | PartEmmit1.Speed = NumberRange.new(0, 0) | |
1049 | PartEmmit1.VelocitySpread = 30000 | |
1050 | PartEmmit1.Rotation = NumberRange.new(-500, 500) | |
1051 | PartEmmit1.RotSpeed = NumberRange.new(-500, 500) | |
1052 | local BodPoss = IT("BodyPosition", v) | |
1053 | BodPoss.P = 3000 | |
1054 | BodPoss.D = 1000 | |
1055 | BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000) | |
1056 | BodPoss.position = v.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15)) | |
1057 | v.Color = maincolor.Color | |
1058 | coroutine.resume(coroutine.create(function() | |
1059 | for i = 0, 49 do | |
1060 | swait(1) | |
1061 | v.Transparency = v.Transparency + 0.08 | |
1062 | end | |
1063 | wait(0.5) | |
1064 | PartEmmit1.Enabled = false | |
1065 | wait(3) | |
1066 | v:Destroy() | |
1067 | dude:Destroy() | |
1068 | end)) | |
1069 | end)) | |
1070 | end | |
1071 | end | |
1072 | end)) | |
1073 | end) | |
1074 | ds() | |
1075 | end | |
1076 | end | |
1077 | ||
1078 | function FindNearestHead(Position, Distance, SinglePlayer) | |
1079 | if SinglePlayer then | |
1080 | return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude | |
1081 | end | |
1082 | local List = {} | |
1083 | for i, v in pairs(workspace:GetChildren()) do | |
1084 | if v:IsA("Model") and v:findFirstChild("Head") and v ~= char and Distance >= (v.Head.Position - Position).magnitude then | |
1085 | table.insert(List, v) | |
1086 | end | |
1087 | end | |
1088 | return List | |
1089 | end | |
1090 | ||
1091 | function Aura(bonuspeed, FastSpeed, type, pos, x1, y1, z1, value, color, outerpos, MType) | |
1092 | local type = type | |
1093 | local rng = Instance.new("Part", char) | |
1094 | rng.Anchored = true | |
1095 | rng.BrickColor = color | |
1096 | rng.CanCollide = false | |
1097 | rng.FormFactor = 3 | |
1098 | rng.Name = "Ring" | |
1099 | rng.Material = "Neon" | |
1100 | rng.Size = Vector3.new(1, 1, 1) | |
1101 | rng.Transparency = 0 | |
1102 | rng.TopSurface = 0 | |
1103 | rng.BottomSurface = 0 | |
1104 | rng.CFrame = pos | |
1105 | rng.CFrame = rng.CFrame + rng.CFrame.lookVector * outerpos | |
1106 | local rngm = Instance.new("SpecialMesh", rng) | |
1107 | rngm.MeshType = MType | |
1108 | rngm.Scale = Vector3.new(x1, y1, z1) | |
1109 | local scaler2 = 1 | |
1110 | local speeder = FastSpeed | |
1111 | if type == "Add" then | |
1112 | scaler2 = 1 * value | |
1113 | elseif type == "Divide" then | |
1114 | scaler2 = 1 / value | |
1115 | end | |
1116 | coroutine.resume(coroutine.create(function() | |
1117 | for i = 0, 10 / bonuspeed, 0.1 do | |
1118 | swait() | |
1119 | if type == "Add" then | |
1120 | scaler2 = scaler2 - 0.01 * value / bonuspeed | |
1121 | elseif type == "Divide" then | |
1122 | scaler2 = scaler2 - 0.01 / value * bonuspeed | |
1123 | end | |
1124 | speeder = speeder - 0.01 * FastSpeed * bonuspeed | |
1125 | rng.CFrame = rng.CFrame + rng.CFrame.lookVector * speeder * bonuspeed | |
1126 | rng.Transparency = rng.Transparency + 0.01 * bonuspeed | |
1127 | rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, 0) | |
1128 | end | |
1129 | rng:Destroy() | |
1130 | end)) | |
1131 | end | |
1132 | ||
1133 | function SoulSteal(dude) | |
1134 | if dude.Name ~= char then | |
1135 | local bgf = IT("BodyGyro", dude.Head) | |
1136 | bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0) | |
1137 | local val = IT("BoolValue", dude) | |
1138 | val.Name = "IsHit" | |
1139 | local torso = (dude:FindFirstChild'Head' or dude:FindFirstChild'Torso' or dude:FindFirstChild'UpperTorso' or dude:FindFirstChild'LowerTorso' or dude:FindFirstChild'HumanoidRootPart') | |
1140 | local soulst = coroutine.wrap(function() | |
1141 | local soul = Instance.new("Part",dude) | |
1142 | soul.Size = Vector3.new(1,1,1) | |
1143 | soul.CanCollide = false | |
1144 | soul.Anchored = false | |
1145 | soul.Position = torso.Position | |
1146 | soul.Transparency = 1 | |
1147 | local PartEmmit1 = IT("ParticleEmitter", soul) | |
1148 | PartEmmit1.LightEmission = 1 | |
1149 | PartEmmit1.Texture = "rbxassetid://569507414" | |
1150 | PartEmmit1.Color = ColorSequence.new(maincolor.Color) | |
1151 | PartEmmit1.Rate = 250 | |
1152 | PartEmmit1.Lifetime = NumberRange.new(1.6) | |
1153 | PartEmmit1.Size = NumberSequence.new({ | |
1154 | NumberSequenceKeypoint.new(0, 1, 0), | |
1155 | NumberSequenceKeypoint.new(1, 0, 0) | |
1156 | }) | |
1157 | PartEmmit1.Transparency = NumberSequence.new({ | |
1158 | NumberSequenceKeypoint.new(0, 0, 0), | |
1159 | NumberSequenceKeypoint.new(1, 1, 0) | |
1160 | }) | |
1161 | PartEmmit1.Speed = NumberRange.new(0, 0) | |
1162 | PartEmmit1.VelocitySpread = 30000 | |
1163 | PartEmmit1.Rotation = NumberRange.new(-360, 360) | |
1164 | PartEmmit1.RotSpeed = NumberRange.new(-360, 360) | |
1165 | local BodPoss = IT("BodyPosition", soul) | |
1166 | BodPoss.P = 3000 | |
1167 | BodPoss.D = 1000 | |
1168 | BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000) | |
1169 | BodPoss.position = torso.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15)) | |
1170 | wait(1.6) | |
1171 | soul.Touched:connect(function(hit) | |
1172 | if hit.Parent == char then | |
1173 | soul:Destroy() | |
1174 | end | |
1175 | end) | |
1176 | wait(1.2) | |
1177 | while soul do | |
1178 | swait() | |
1179 | PartEmmit1.Color = ColorSequence.new(maincolor.Color) | |
1180 | BodPoss.Position = tors.Position | |
1181 | end | |
1182 | end) | |
1183 | soulst() | |
1184 | end | |
1185 | end | |
1186 | function FaceMouse() | |
1187 | local Cam = workspace.CurrentCamera | |
1188 | return { | |
1189 | CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)), | |
1190 | Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z) | |
1191 | } | |
1192 | end | |
1193 | ------------------------------------------------------- | |
1194 | --End Effect Function-- | |
1195 | ------------------------------------------------------- | |
1196 | function Cso(ID, PARENT, VOLUME, PITCH) | |
1197 | local NSound = nil | |
1198 | coroutine.resume(coroutine.create(function() | |
1199 | NSound = IT("Sound", PARENT) | |
1200 | NSound.Volume = VOLUME | |
1201 | NSound.Pitch = PITCH | |
1202 | NSound.SoundId = "http://www.roblox.com/asset/?id="..ID | |
1203 | swait() | |
1204 | NSound:play() | |
1205 | game:GetService("Debris"):AddItem(NSound, 10) | |
1206 | end)) | |
1207 | return NSound | |
1208 | end | |
1209 | function CameraEnshaking(Length, Intensity) | |
1210 | coroutine.resume(coroutine.create(function() | |
1211 | local intensity = 1 * Intensity | |
1212 | local rotM = 0.01 * Intensity | |
1213 | for i = 0, Length, 0.1 do | |
1214 | swait() | |
1215 | intensity = intensity - 0.05 * Intensity / Length | |
1216 | rotM = rotM - 5.0E-4 * Intensity / Length | |
1217 | hum.CameraOffset = Vector3.new(Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity)), Rad(Mrandom(-intensity, intensity))) | |
1218 | 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) | |
1219 | end | |
1220 | hum.CameraOffset = Vector3.new(0, 0, 0) | |
1221 | end)) | |
1222 | end | |
1223 | ------------------------------------------------------- | |
1224 | --End Important Functions-- | |
1225 | ------------------------------------------------------- | |
1226 | ||
1227 | ||
1228 | ------------------------------------------------------- | |
1229 | --Start Customization-- | |
1230 | ------------------------------------------------------- | |
1231 | local Player_Size = 1 | |
1232 | if Player_Size ~= 1 then | |
1233 | root.Size = root.Size * Player_Size | |
1234 | tors.Size = tors.Size * Player_Size | |
1235 | hed.Size = hed.Size * Player_Size | |
1236 | ra.Size = ra.Size * Player_Size | |
1237 | la.Size = la.Size * Player_Size | |
1238 | rl.Size = rl.Size * Player_Size | |
1239 | ll.Size = ll.Size * Player_Size | |
1240 | ---------------------------------------------------------------------------------- | |
1241 | rootj.Parent = root | |
1242 | neck.Parent = tors | |
1243 | RW.Parent = tors | |
1244 | LW.Parent = tors | |
1245 | RH.Parent = tors | |
1246 | LH.Parent = tors | |
1247 | ---------------------------------------------------------------------------------- | |
1248 | rootj.C0 = RootCF * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0)) | |
1249 | rootj.C1 = RootCF * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0)) | |
1250 | neck.C0 = necko * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * angles(Rad(0), Rad(0), Rad(0)) | |
1251 | neck.C1 = CF(0 * Player_Size, -0.5 * Player_Size, 0 * Player_Size) * angles(Rad(-90), Rad(0), Rad(180)) | |
1252 | RW.C0 = CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0)) --* RIGHTSHOULDERC0 | |
1253 | LW.C0 = CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * angles(Rad(0), Rad(0), Rad(0)) --* LEFTSHOULDERC0 | |
1254 | ---------------------------------------------------------------------------------- | |
1255 | 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)) | |
1256 | 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)) | |
1257 | 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)) | |
1258 | 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)) | |
1259 | --hat.Parent = Character | |
1260 | end | |
1261 | ---------------------------------------------------------------------------------- | |
1262 | local SONG = 0 | |
1263 | local SONG2 = 0 | |
1264 | local Music = Instance.new("Sound",tors) | |
1265 | Music.Volume = 2.5 | |
1266 | Music.Looped = true | |
1267 | Music.Pitch = 1 --Pitcher | |
1268 | local HighNoon = Instance.new("Sound",char) | |
1269 | HighNoon.Volume = 10 | |
1270 | HighNoon.SoundId = "rbxassetid://814875394" | |
1271 | HighNoon.Looped = false | |
1272 | HighNoon.Pitch = 1 --Pitcher | |
1273 | ---------------------------------------------------------------------------------- | |
1274 | local equipped = false | |
1275 | local idle = 0 | |
1276 | local change = 1 | |
1277 | local val = 0 | |
1278 | local toim = 0 | |
1279 | local idleanim = 0.4 | |
1280 | local sine = 0 | |
1281 | ---------------------------------------------------------------------------------- | |
1282 | hum.WalkSpeed = 8 | |
1283 | hum.JumpPower = 57 | |
1284 | hum.Animator.Parent = nil | |
1285 | local Hair = Instance.new("Part", char) | |
1286 | Hair.Name = "Hair" | |
1287 | Hair.CanCollide = false | |
1288 | Hair.BrickColor = BrickColor.new("Institutional white") | |
1289 | Hair.Transparency = 0 | |
1290 | Hair.Material = "Plastic" | |
1291 | Hair.Size = Vector3.new(1, 1, 2) | |
1292 | Hair.TopSurface = Enum.SurfaceType.Smooth | |
1293 | Hair.BottomSurface = Enum.SurfaceType.Smooth | |
1294 | ||
1295 | local Weld = Instance.new("Weld", Hair) | |
1296 | Weld.Part0 = hed | |
1297 | Weld.Part1 = Hair | |
1298 | Weld.C1 = CFrame.new(0, -.6, 0) | |
1299 | Weld.C0 = CFrame.Angles(math.rad(0),math.rad(0),0) | |
1300 | ||
1301 | local M2 = Instance.new("SpecialMesh") | |
1302 | M2.Parent = Hair | |
1303 | M2.MeshId = "http://www.roblox.com/asset/?id=10684207" | |
1304 | M2.TextureId = "http://www.roblox.com/asset/?id=10684155" | |
1305 | M2.Scale = Vector3.new(1, 1, 1) | |
1306 | ||
1307 | local Hat = char:FindFirstChild("Hat_F") or Instance.new("Hat") | |
1308 | Hat.AttachmentPos = Vector3.new(0, 0.33, 0) | |
1309 | Hat.Name = "Hat_F" | |
1310 | local Handle = Hat:FindFirstChild("Handle") or Instance.new("Part", Hat) | |
1311 | if Handle.Name ~= "Handle" then | |
1312 | Handle.Size = Vector3.new(1, 1, 1) | |
1313 | end | |
1314 | Handle.BottomSurface = 0 | |
1315 | Handle.Name = "Handle" | |
1316 | Handle.TopSurface = 0 | |
1317 | Handle.Locked = 1 | |
1318 | handle = Instance.new("Part", char) | |
1319 | handle.TopSurface = "Smooth" | |
1320 | handle.BottomSurface = "Smooth" | |
1321 | handle.Material = "Neon" | |
1322 | handle.Size = Vector3.new(0.4, 1.2, 2) | |
1323 | handle.CanCollide = false | |
1324 | handle.FormFactor = "Custom" | |
1325 | local Weldb = Instance.new("Weld", char) | |
1326 | Weldb.Part0 = ra | |
1327 | Weldb.Part1 = handle | |
1328 | Weldb.C1 = CFrame.new(0, -.4, -1.6) *angles(Rad(90), Rad(0), Rad(180)) | |
1329 | local KnifeMesh = Instance.new("SpecialMesh", handle) | |
1330 | KnifeMesh.MeshType = "FileMesh" | |
1331 | KnifeMesh.MeshId = "http://www.roblox.com/asset/?id=432256490" | |
1332 | KnifeMesh.TextureId = "http://www.roblox.com/asset/?id=432256526" | |
1333 | KnifeMesh.Scale = Vector3.new(.002, .002, .002) | |
1334 | ------------------------------------------------------- | |
1335 | --End Customization-- | |
1336 | ------------------------------------------------------- | |
1337 | ||
1338 | ||
1339 | ------------------------------------------------------- | |
1340 | --Start Attacks N Stuff-- | |
1341 | ------------------------------------------------------- | |
1342 | function High_Noon() | |
1343 | print("Oh no.....") | |
1344 | attack = true | |
1345 | HighNoon:Play() | |
1346 | --Cso("814875394", char, 10, 1) | |
1347 | local orb = Instance.new("Part", char) | |
1348 | orb.Anchored = true | |
1349 | orb.BrickColor = BrickC("Really black") | |
1350 | orb.CanCollide = false | |
1351 | orb.FormFactor = 3 | |
1352 | orb.Name = "Ring" | |
1353 | orb.Material = "Neon" | |
1354 | orb.Size = Vector3.new(1, 1, 1) | |
1355 | orb.Transparency = 0 | |
1356 | orb.TopSurface = 0 | |
1357 | orb.BottomSurface = 0 | |
1358 | local orbm = Instance.new("SpecialMesh", orb) | |
1359 | orbm.MeshType = "Sphere" | |
1360 | orbm.Name = "SizeMesh" | |
1361 | orbm.Scale = Vector3.new(0, 0, 0) | |
1362 | local scaled = 0.1 | |
1363 | local posid = 0 | |
1364 | for i = 0, 109, 0.1 do | |
1365 | swait() | |
1366 | scaled = scaled + 0.001 | |
1367 | --posid = posid - scaled | |
1368 | orb.CFrame = ra.CFrame * CF(0, -0.1 + posid / 1.05, 0) | |
1369 | orbm.Scale = orbm.Scale + Vector3.new(scaled, scaled, scaled) | |
1370 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(90)), 0.2) | |
1371 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(30), Rad(0), Rad(0)), 0.2) | |
1372 | RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.2) | |
1373 | LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.2) | |
1374 | RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-.6), Rad(90)), 0.2) | |
1375 | LW.C0 = clerp(LW.C0, CF(-1.2* Player_Size, 0.8 + 0.02 * Sin(sine / 20* Player_Size), -.6* Player_Size) * angles(Rad(-45), Rad(-.6), Rad(136 - 4.5 * Sin(sine / 20))), 0.2) | |
1376 | end | |
1377 | coroutine.resume(coroutine.create(function() | |
1378 | orb.Anchored = false | |
1379 | --CFuncs.Sound.Create("rbxassetid://260433768", root, 1.25, 1) | |
1380 | local a = Instance.new("Part", workspace) | |
1381 | a.Name = "Direction" | |
1382 | a.Anchored = true | |
1383 | a.BrickColor = BrickC("Bright red") | |
1384 | a.Material = "Neon" | |
1385 | a.Transparency = 1 | |
1386 | a.CanCollide = false | |
1387 | local ray = Ray.new(orb.CFrame.p, (root.CFrame.lookVector - orb.CFrame.p).unit * 500) | |
1388 | local ignore = orb | |
1389 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1390 | a.BottomSurface = 10 | |
1391 | a.TopSurface = 10 | |
1392 | local distance = (orb.CFrame.p - position).magnitude | |
1393 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
1394 | a.CFrame = CF(orb.CFrame.p, position) * CF(0, 0, 0) | |
1395 | orb.CFrame = a.CFrame | |
1396 | a:Destroy() | |
1397 | local bv = Instance.new("BodyVelocity") | |
1398 | bv.maxForce = Vector3.new(1000000000, 1000000000, 1000000000) | |
1399 | bv.velocity = orb.CFrame.lookVector * 125 | |
1400 | bv.Parent = orb | |
1401 | local hitted = false | |
1402 | game:GetService("Debris"):AddItem(orb, 15) | |
1403 | wait() | |
1404 | local hit = orb.Touched:connect(function(hit) | |
1405 | if hitted == false then | |
1406 | hitted = true | |
1407 | coroutine.resume(coroutine.create(function() | |
1408 | for i = 0,1.8,0.1 do | |
1409 | swait() | |
1410 | hum.CameraOffset = Vector3.new(Mrandom(-1,1),0,Mrandom(-1,1)) | |
1411 | end | |
1412 | for i = 0,1.8,0.1 do | |
1413 | swait() | |
1414 | hum.CameraOffset = Vector3.new(0,0,0) | |
1415 | end | |
1416 | end)) | |
1417 | CFuncs.Sound.Create("rbxassetid://151304356", orb, 5, 1) | |
1418 | for i, v in pairs(FindNearestHead(orb.CFrame.p, 50000)) do | |
1419 | if v:FindFirstChild("Head") then | |
1420 | Eviscerate(v) | |
1421 | end | |
1422 | end | |
1423 | Magic(1, "Add", orb.CFrame, Vector3.new(orbm.Scale.x, orbm.Scale.y, orbm.Scale.z), 1, BrickC("Really black"), "Sphere") | |
1424 | Magic(2, "Add", orb.CFrame, Vector3.new(orbm.Scale.x, orbm.Scale.y, orbm.Scale.z), 2, BrickC("Really black"), "Sphere") | |
1425 | for i = 0, 9 do | |
1426 | --Aura(1, 2.5, "Add", orb.CFrame * angles(Rad(Mrandom(-360, 360)), Rad(Mrandom(-360, 360)), Rad(Mrandom(-360, 360))), 5, 5, 50, -0.05, BrickColor.new("Royal purple"), 0, "Sphere") | |
1427 | --Aura(2, 5, "Add", orb.CFrame * angles(Rad(Mrandom(-360, 360)), Rad(Mrandom(-360, 360)), Rad(Mrandom(-360, 360))), 5, 5, 50, -0.05, BrickColor.new("Royal purple"), 0, "Sphere") | |
1428 | end | |
1429 | orb.Anchored = true | |
1430 | orb.Transparency = 1 | |
1431 | wait(8) | |
1432 | orb:Destroy() | |
1433 | end | |
1434 | end) | |
1435 | end)) | |
1436 | for i = 0, 6, 0.1 do | |
1437 | swait() | |
1438 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(90)), 0.2) | |
1439 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(30), Rad(0), Rad(0)), 0.2) | |
1440 | RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.2) | |
1441 | LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.2) | |
1442 | RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-.6), Rad(124)), 0.2) | |
1443 | LW.C0 = clerp(LW.C0, CF(-1.2* Player_Size, 0.8 + 0.02 * Sin(sine / 20* Player_Size), -.6* Player_Size) * angles(Rad(-45), Rad(-.6), Rad(136 - 4.5 * Sin(sine / 20))), 0.2) | |
1444 | end | |
1445 | attack = false | |
1446 | end | |
1447 | function Up_High_Noon() | |
1448 | print("Oh no.....") | |
1449 | attack = true | |
1450 | HighNoon:Play() | |
1451 | --Cso("814875394", char, 10, 1) | |
1452 | local orb = Instance.new("Part", char) | |
1453 | orb.Anchored = true | |
1454 | orb.BrickColor = BrickC("Really black") | |
1455 | orb.CanCollide = false | |
1456 | orb.FormFactor = 3 | |
1457 | orb.Name = "Ring" | |
1458 | orb.Material = "Neon" | |
1459 | orb.Size = Vector3.new(1, 1, 1) | |
1460 | orb.Transparency = 0 | |
1461 | orb.TopSurface = 0 | |
1462 | orb.BottomSurface = 0 | |
1463 | local orbm = Instance.new("SpecialMesh", orb) | |
1464 | orbm.MeshType = "Sphere" | |
1465 | orbm.Name = "SizeMesh" | |
1466 | orbm.Scale = Vector3.new(0, 0, 0) | |
1467 | local scaled = 0.1 | |
1468 | local posid = 0 | |
1469 | for i = 0, 109, 0.1 do | |
1470 | swait() | |
1471 | scaled = scaled + 0.001 | |
1472 | posid = posid - scaled | |
1473 | orb.CFrame = ra.CFrame * CF(0, -0.1 + posid / 1.05, 0) | |
1474 | orbm.Scale = orbm.Scale + Vector3.new(scaled, scaled, scaled) | |
1475 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(90)), 0.2) | |
1476 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(30), Rad(0), Rad(0)), 0.2) | |
1477 | RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.2) | |
1478 | LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.2) | |
1479 | RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-.6), Rad(180)), 0.2) | |
1480 | LW.C0 = clerp(LW.C0, CF(-1.2* Player_Size, 0.8 + 0.02 * Sin(sine / 20* Player_Size), -.6* Player_Size) * angles(Rad(-45), Rad(-.6), Rad(136 - 4.5 * Sin(sine / 20))), 0.2) | |
1481 | end | |
1482 | coroutine.resume(coroutine.create(function() | |
1483 | orb.Anchored = false | |
1484 | --CFuncs.Sound.Create("rbxassetid://260433768", root, 1.25, 1) | |
1485 | local a = Instance.new("Part", workspace) | |
1486 | a.Name = "Direction" | |
1487 | a.Anchored = true | |
1488 | a.BrickColor = BrickC("Bright red") | |
1489 | a.Material = "Neon" | |
1490 | a.Transparency = 1 | |
1491 | a.CanCollide = false | |
1492 | local ray = Ray.new(orb.CFrame.p, (root.CFrame.lookVector - orb.CFrame.p).unit * 500) | |
1493 | local ignore = orb | |
1494 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1495 | a.BottomSurface = 10 | |
1496 | a.TopSurface = 10 | |
1497 | local distance = (orb.CFrame.p - position).magnitude | |
1498 | a.Size = Vector3.new(0.1, 0.1, 0.1) | |
1499 | a.CFrame = CF(orb.CFrame.p, position) * CF(0, 0, 0) | |
1500 | orb.CFrame = a.CFrame | |
1501 | a:Destroy() | |
1502 | local bv = Instance.new("BodyVelocity") | |
1503 | bv.maxForce = Vector3.new(1000000000, 1000000000, 1000000000) | |
1504 | bv.velocity = orb.CFrame.lookVector * 125 | |
1505 | bv.Parent = orb | |
1506 | local hitted = false | |
1507 | game:GetService("Debris"):AddItem(orb, 15) | |
1508 | wait() | |
1509 | local hit = orb.Touched:connect(function(hit) | |
1510 | if hitted == false then | |
1511 | hitted = true | |
1512 | coroutine.resume(coroutine.create(function() | |
1513 | for i = 0,1.8,0.1 do | |
1514 | swait() | |
1515 | hum.CameraOffset = Vector3.new(Mrandom(-1,1),0,Mrandom(-1,1)) | |
1516 | end | |
1517 | for i = 0,1.8,0.1 do | |
1518 | swait() | |
1519 | hum.CameraOffset = Vector3.new(0,0,0) | |
1520 | end | |
1521 | end)) | |
1522 | CFuncs.Sound.Create("rbxassetid://151304356", orb, 5, 1) | |
1523 | for i, v in pairs(FindNearestHead(orb.CFrame.p, 50000)) do | |
1524 | if v:FindFirstChild("Head") then | |
1525 | Eviscerate(v) | |
1526 | end | |
1527 | end | |
1528 | Magic(1, "Add", orb.CFrame, Vector3.new(orbm.Scale.x, orbm.Scale.y, orbm.Scale.z), 1, BrickC("Really black"), "Sphere") | |
1529 | Magic(2, "Add", orb.CFrame, Vector3.new(orbm.Scale.x, orbm.Scale.y, orbm.Scale.z), 2, BrickC("Really black"), "Sphere") | |
1530 | for i = 0, 9 do | |
1531 | --Aura(1, 2.5, "Add", orb.CFrame * angles(Rad(Mrandom(-360, 360)), Rad(Mrandom(-360, 360)), Rad(Mrandom(-360, 360))), 5, 5, 50, -0.05, BrickColor.new("Royal purple"), 0, "Sphere") | |
1532 | --Aura(2, 5, "Add", orb.CFrame * angles(Rad(Mrandom(-360, 360)), Rad(Mrandom(-360, 360)), Rad(Mrandom(-360, 360))), 5, 5, 50, -0.05, BrickColor.new("Royal purple"), 0, "Sphere") | |
1533 | end | |
1534 | orb.Anchored = true | |
1535 | orb.Transparency = 1 | |
1536 | wait(8) | |
1537 | orb:Destroy() | |
1538 | end | |
1539 | end) | |
1540 | end)) | |
1541 | for i = 0, 6, 0.1 do | |
1542 | swait() | |
1543 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(90)), 0.2) | |
1544 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(30), Rad(0), Rad(0)), 0.2) | |
1545 | RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.2) | |
1546 | LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.2) | |
1547 | RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-.6), Rad(124)), 0.2) | |
1548 | LW.C0 = clerp(LW.C0, CF(-1.2* Player_Size, 0.8 + 0.02 * Sin(sine / 20* Player_Size), -.6* Player_Size) * angles(Rad(-45), Rad(-.6), Rad(136 - 4.5 * Sin(sine / 20))), 0.2) | |
1549 | end | |
1550 | attack = false | |
1551 | end | |
1552 | ------------------------------------------------------- | |
1553 | --End Attacks N Stuff-- | |
1554 | ------------------------------------------------------- | |
1555 | mouse.KeyDown:connect(function(key) | |
1556 | if string.byte(key) == 48 then | |
1557 | Swing = 2 | |
1558 | hum.WalkSpeed = 38.82 | |
1559 | end | |
1560 | end) | |
1561 | mouse.KeyUp:connect(function(key) | |
1562 | if string.byte(key) == 48 then | |
1563 | Swing = 1 | |
1564 | hum.WalkSpeed = 8 | |
1565 | end | |
1566 | end) | |
1567 | mouse.KeyDown:connect(function(key) | |
1568 | if attack == false then | |
1569 | if key == 'z' then | |
1570 | High_Noon() | |
1571 | elseif key == 'x' then | |
1572 | Up_High_Noon() | |
1573 | end | |
1574 | end | |
1575 | end) | |
1576 | ||
1577 | ||
1578 | ||
1579 | ||
1580 | ||
1581 | ||
1582 | ||
1583 | ||
1584 | ------------------------------------------------------- | |
1585 | --Start Animations-- | |
1586 | ------------------------------------------------------- | |
1587 | while true do | |
1588 | swait() | |
1589 | sine = sine + change | |
1590 | local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude | |
1591 | local velderp = root.Velocity.y | |
1592 | hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4* Player_Size, char) | |
1593 | if equipped == true or equipped == false then | |
1594 | if attack == false then | |
1595 | idle = idle + 1 | |
1596 | else | |
1597 | idle = 0 | |
1598 | end | |
1599 | if 1 < root.Velocity.y and hitfloor == nil then | |
1600 | Anim = "Jump" | |
1601 | if attack == false then | |
1602 | 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.15) | |
1603 | 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) | |
1604 | 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.15) | |
1605 | 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.15) | |
1606 | 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) | |
1607 | 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) | |
1608 | end | |
1609 | elseif -1 > root.Velocity.y and hitfloor == nil then | |
1610 | Anim = "Fall" | |
1611 | if attack == false then | |
1612 | 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.15) | |
1613 | 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) | |
1614 | 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.15) | |
1615 | 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.15) | |
1616 | 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) | |
1617 | 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) | |
1618 | end | |
1619 | elseif torvel < 1 and hitfloor ~= nil then | |
1620 | Anim = "Idle" | |
1621 | change = .5 | |
1622 | if attack == false then | |
1623 | 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) | |
1624 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.5 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3) | |
1625 | RH.C0 = clerp(RH.C0, CF(1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15) | |
1626 | LH.C0 = clerp(LH.C0, CF(-1* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15) | |
1627 | RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-.6), Rad(3 + 4.5 * Sin(sine / 20))), 0.1) | |
1628 | LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.02 * Sin(sine / 20* Player_Size), 0* Player_Size) * angles(Rad(0), Rad(-.6), Rad(-3 - 4.5 * Sin(sine / 20))), 0.1) | |
1629 | end | |
1630 | elseif torvel > 2 and torvel < 25 and hitfloor ~= nil then | |
1631 | Anim = "Walk" | |
1632 | change = .9 | |
1633 | if attack == false then | |
1634 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(3 - 2.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(8 * Cos(sine / 7))), 0.15) | |
1635 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(6 - 2.5 * Sin(sine / 7)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3) | |
1636 | RH.C0 = clerp(RH.C0, CF(1, -0.8 - 0.5 * Cos(sine / 7) / 2, 0.6 * Cos(sine / 7) / 2) * angles(Rad(-15 - 5 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 3 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 2 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3) | |
1637 | LH.C0 = clerp(LH.C0, CF(-1, -0.8 + 0.5 * Cos(sine / 7) / 2, -0.6 * Cos(sine / 7) / 2) * angles(Rad(-15 + 5 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 3 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 2 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3) | |
1638 | RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(37) * Cos(sine / 7) , Rad(0), Rad(-.6) - ra.RotVelocity.Y / 75), 0.1) | |
1639 | LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(-37) * Cos(sine / 7) , Rad(0) , Rad(.6) + la.RotVelocity.Y / 75), 0.1) | |
1640 | end | |
1641 | elseif torvel >= 25 and hitfloor ~= nil then | |
1642 | Anim = "Sprint" | |
1643 | change = 1.35 | |
1644 | if attack == false then | |
1645 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175 + 0.025 * 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) | |
1646 | 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) | |
1647 | RH.C0 = clerp(RH.C0, CF(1, -0.925 - 0.5 * Cos(sine / 7) / 2, 0.7 * Cos(sine / 7) / 2) * angles(Rad(-15 - 35 * 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) | |
1648 | LH.C0 = clerp(LH.C0, CF(-1, -0.925 + 0.5 * Cos(sine / 7) / 2, -0.7 * Cos(sine / 7) / 2) * angles(Rad(-15 + 35 * 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) | |
1649 | RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 30), 0.34 * Cos(sine / 7)) * angles(Rad(110) * Cos(sine / 7) , Rad(0), Rad(13) - ra.RotVelocity.Y / 75), 0.15) | |
1650 | LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 30), -0.34 * Cos(sine / 7)) * angles(Rad(-110) * Cos(sine / 7) , Rad(0) , Rad(-13) + la.RotVelocity.Y / 75), 0.15) | |
1651 | end | |
1652 | end | |
1653 | end | |
1654 | Music.SoundId = "rbxassetid://"..SONG | |
1655 | Music.Looped = true | |
1656 | Music.Pitch = 1 | |
1657 | Music.Volume = 5 | |
1658 | Music.Parent = tors | |
1659 | Music:Resume() | |
1660 | for _, c in pairs(char:GetChildren()) do | |
1661 | if c.ClassName == "Accessory" then | |
1662 | c:remove() | |
1663 | end | |
1664 | end | |
1665 | if 0 < #Effects then | |
1666 | for e = 1, #Effects do | |
1667 | if Effects[e] ~= nil then | |
1668 | local Thing = Effects[e] | |
1669 | if Thing ~= nil then | |
1670 | local Part = Thing[1] | |
1671 | local Mode = Thing[2] | |
1672 | local Delay = Thing[3] | |
1673 | local IncX = Thing[4] | |
1674 | local IncY = Thing[5] | |
1675 | local IncZ = Thing[6] | |
1676 | if 1 >= Thing[1].Transparency then | |
1677 | if Thing[2] == "Block1" then | |
1678 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1679 | local Mesh = Thing[1].Mesh | |
1680 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1681 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1682 | elseif Thing[2] == "Block2" then | |
1683 | Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0) | |
1684 | local Mesh = Thing[7] | |
1685 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1686 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1687 | elseif Thing[2] == "Block3" then | |
1688 | 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) | |
1689 | local Mesh = Thing[7] | |
1690 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1691 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1692 | elseif Thing[2] == "Cylinder" then | |
1693 | local Mesh = Thing[1].Mesh | |
1694 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1695 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1696 | elseif Thing[2] == "Blood" then | |
1697 | local Mesh = Thing[7] | |
1698 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0) | |
1699 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1700 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1701 | elseif Thing[2] == "Elec" then | |
1702 | local Mesh = Thing[1].Mesh | |
1703 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
1704 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1705 | elseif Thing[2] == "Disappear" then | |
1706 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1707 | elseif Thing[2] == "Shatter" then | |
1708 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1709 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
1710 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
1711 | Thing[6] = Thing[6] + Thing[5] | |
1712 | end | |
1713 | else | |
1714 | Part.Parent = nil | |
1715 | table.remove(Effects, e) | |
1716 | end | |
1717 | end | |
1718 | end | |
1719 | end | |
1720 | end | |
1721 | end | |
1722 | ------------------------------------------------------- | |
1723 | --End Animations And Script-- | |
1724 | ------------------------------------------------------- |