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