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