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,game,owner = owner,game | |
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 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
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 | --[[Floaty thing by SezHu. | |
145 | ||
146 | If you want a creation like this of your own, shoot me a friend request me on Discord! (Sezzie | |
147 | #1875) Prices start at 250 robux.]]-- | |
148 | ||
149 | ||
150 | local songs = { | |
151 | 1279200618, --Sunset Lover | |
152 | 1415778396, --Steamed Hams | |
153 | 433458884, --Chill 2 | |
154 | 270181115, --Soul Food | |
155 | 925631718, --Burn Marks | |
156 | 149650572, | |
157 | 998900895, --D r o w z y | |
158 | 213731051, --S a y o n a r a | |
159 | 1366623042, --Oracle | |
160 | } --Add your songs by replacing the IDs with your song ID. | |
161 | ||
162 | ||
163 | local quotes = { | |
164 | "Something to relax to..", | |
165 | "Yawn..", | |
166 | "Just floatin'~", | |
167 | "Going up~", | |
168 | "I like this song..", | |
169 | "Time to kick back..", | |
170 | "^w^", | |
171 | } --Feel free to replace the quotes with stuff of your own. | |
172 | ||
173 | ||
174 | local function soundbork(obj) | |
175 | if obj:IsA("Sound") and obj.Name ~= "playlist" then | |
176 | --obj:Destroy() Remove the two dashes to silence all music but your own. | |
177 | return | |
178 | end | |
179 | ||
180 | ||
181 | local children = obj:GetChildren() | |
182 | for i = 1, #children do | |
183 | soundbork(children[i]) | |
184 | end | |
185 | ||
186 | return | |
187 | end | |
188 | ||
189 | --//Constants\\-- | |
190 | ||
191 | Effects = { } | |
192 | local Player = game.Players.localPlayer | |
193 | local Mouse = Player:GetMouse() | |
194 | local Character = Player.Character | |
195 | local Humanoid = Character.Humanoid | |
196 | local Head = Character.Head | |
197 | local RootPart = Character.HumanoidRootPart | |
198 | local Torso = Character.Torso | |
199 | local LeftArm = Character["Left Arm"] | |
200 | local RightArm = Character["Right Arm"] | |
201 | local LeftLeg = Character["Left Leg"] | |
202 | local RightLeg = Character["Right Leg"] | |
203 | local Camera = game.Workspace.CurrentCamera | |
204 | local RootJoint = RootPart.RootJoint | |
205 | local Equipped = false | |
206 | local Attack = false | |
207 | local Anim = 'Idle' | |
208 | local Idle = 0 | |
209 | local Combo = 1 | |
210 | local TorsoVelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
211 | local Velocity = RootPart.Velocity.y | |
212 | local Sine = 0 | |
213 | local Change = 1 | |
214 | local aoeconstant = 10 | |
215 | local maincol = "Pink" | |
216 | local maincol2 = "White" | |
217 | local randString = songs[math.random(#songs)] | |
218 | local circleinthesky = false | |
219 | Character.Humanoid.Name = "help" | |
220 | humanoid = Character.help | |
221 | Instance.new("ForceField",Character).Visible = false | |
222 | ||
223 | ||
224 | ||
225 | ||
226 | ||
227 | local RbxUtility = LoadLibrary("RbxUtility") | |
228 | local Create = RbxUtility.Create | |
229 | ||
230 | humanoid.WalkSpeed = 3 | |
231 | humanoid.JumpPower = 0 | |
232 | humanoid.Animator.Parent = nil | |
233 | Character.Animate.Parent = nil | |
234 | ||
235 | local newMotor = function(part0, part1, c0, c1) | |
236 | local w = Create('Motor'){ | |
237 | Parent = part0, | |
238 | Part0 = part0, | |
239 | Part1 = part1, | |
240 | C0 = c0, | |
241 | C1 = c1, | |
242 | } | |
243 | return w | |
244 | end | |
245 | ||
246 | ||
247 | skillcolorscheme = BrickColor.new(maincol).Color | |
248 | ||
249 | local hue = 0 | |
250 | ||
251 | spawn(function() | |
252 | while true do | |
253 | hue = hue + .0005 | |
254 | if hue >= 1 then hue = 0 end | |
255 | maincol2 = Color3.fromHSV(hue,1,1) | |
256 | game["Run Service"].RenderStepped:wait() | |
257 | end | |
258 | end) | |
259 | ||
260 | ||
261 | ||
262 | ||
263 | ||
264 | ||
265 | local scrn = Instance.new('ScreenGui', Player.PlayerGui) | |
266 | function makeframe(par, trans, pos, size, color) | |
267 | local frame = Instance.new('Frame', par) | |
268 | frame.BackgroundTransparency = trans | |
269 | frame.BorderSizePixel = 0 | |
270 | frame.Position = pos | |
271 | frame.Size = size | |
272 | frame.BackgroundColor3 = color | |
273 | return frame | |
274 | end | |
275 | ||
276 | --framesk1 = makeframe(scrn, .95, UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0), skillcolorscheme) | |
277 | ||
278 | function clerp(a, b, t) | |
279 | return a:lerp(b, t) | |
280 | end | |
281 | ||
282 | RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
283 | NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
284 | ||
285 | local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0)) | |
286 | local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0)) | |
287 | local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0)) | |
288 | local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0)) | |
289 | RootJoint.C1 = CFrame.new(0, 0, 0) | |
290 | RootJoint.C0 = CFrame.new(0, 0, 0) | |
291 | Torso.Neck.C1 = CFrame.new(0, 0, 0) | |
292 | Torso.Neck.C0 = CFrame.new(0, 1.5, 0) | |
293 | ||
294 | local rarmc1 = RW.C1 | |
295 | local larmc1 = LW.C1 | |
296 | local rlegc1 = RH.C1 | |
297 | local llegc1 = LH.C1 | |
298 | ||
299 | local resetc1 = false | |
300 | ||
301 | function PlayAnimationFromTable(table, speed, bool) | |
302 | RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) | |
303 | Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) | |
304 | RW.C0 = clerp(RW.C0, table[3], speed) | |
305 | LW.C0 = clerp(LW.C0, table[4], speed) | |
306 | RH.C0 = clerp(RH.C0, table[5], speed) | |
307 | LH.C0 = clerp(LH.C0, table[6], speed) | |
308 | if bool == true then | |
309 | if resetc1 == false then | |
310 | resetc1 = true | |
311 | RootJoint.C1 = RootJoint.C1 | |
312 | Torso.Neck.C1 = Torso.Neck.C1 | |
313 | RW.C1 = rarmc1 | |
314 | LW.C1 = larmc1 | |
315 | RH.C1 = rlegc1 | |
316 | LH.C1 = llegc1 | |
317 | end | |
318 | end | |
319 | end | |
320 | ||
321 | ArtificialHB = Create("BindableEvent"){ | |
322 | Parent = script, | |
323 | Name = "Heartbeat", | |
324 | } | |
325 | ||
326 | script:WaitForChild("Heartbeat") | |
327 | ||
328 | frame = 1 / 35 | |
329 | tf = 0 | |
330 | allowframeloss = false | |
331 | tossremainder = false | |
332 | lastframe = tick() | |
333 | script.Heartbeat:Fire() | |
334 | ||
335 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
336 | tf = tf + s | |
337 | if tf >= frame then | |
338 | if allowframeloss then | |
339 | script.Heartbeat:Fire() | |
340 | lastframe = tick() | |
341 | else | |
342 | for i = 1, math.floor(tf / frame) do | |
343 | script.Heartbeat:Fire() | |
344 | end | |
345 | lastframe = tick() | |
346 | end | |
347 | if tossremainder then | |
348 | tf = 0 | |
349 | else | |
350 | tf = tf - frame * math.floor(tf / frame) | |
351 | end | |
352 | end | |
353 | end) | |
354 | ||
355 | function swait(num) | |
356 | if num == 0 or num == nil then | |
357 | ArtificialHB.Event:wait() | |
358 | else | |
359 | for i = 0, num do | |
360 | ArtificialHB.Event:wait() | |
361 | end | |
362 | end | |
363 | end | |
364 | ||
365 | ||
366 | ||
367 | local m = Create("Model"){ | |
368 | Parent = Character, | |
369 | Name = "WeaponModel" | |
370 | } | |
371 | ||
372 | function RemoveOutlines(part) | |
373 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
374 | end | |
375 | ||
376 | CFuncs = { | |
377 | Part = { | |
378 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
379 | local Part = Create("Part"){ | |
380 | Parent = Parent, | |
381 | Reflectance = Reflectance, | |
382 | Transparency = Transparency, | |
383 | CanCollide = false, | |
384 | Locked = true, | |
385 | BrickColor = BrickColor.new(tostring(BColor)), | |
386 | Name = Name, | |
387 | Size = Size, | |
388 | Material = Material, | |
389 | } | |
390 | RemoveOutlines(Part) | |
391 | if Size == Vector3.new() then | |
392 | Part.Size = Vector3.new(0.2, 0.2, 0.2) | |
393 | else | |
394 | Part.Size = Size | |
395 | end | |
396 | return Part | |
397 | end; | |
398 | }; | |
399 | ||
400 | Mesh = { | |
401 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
402 | local Msh = Create(Mesh){ | |
403 | Parent = Part, | |
404 | Offset = OffSet, | |
405 | Scale = Scale, | |
406 | } | |
407 | if Mesh == "SpecialMesh" then | |
408 | Msh.MeshType = MeshType | |
409 | Msh.MeshId = MeshId | |
410 | end | |
411 | return Msh | |
412 | end; | |
413 | }; | |
414 | ||
415 | Weld = { | |
416 | Create = function(Parent, Part0, Part1, C0, C1) | |
417 | local Weld = Create("Weld"){ | |
418 | Parent = Parent, | |
419 | Part0 = Part0, | |
420 | Part1 = Part1, | |
421 | C0 = C0, | |
422 | C1 = C1, | |
423 | } | |
424 | return Weld | |
425 | end; | |
426 | }; | |
427 | ||
428 | Sound = { | |
429 | Create = function(id, par, vol, pit, looped) | |
430 | coroutine.resume(coroutine.create(function() | |
431 | local S = Create("Sound"){ | |
432 | Volume = vol, | |
433 | Pitch = pit or 1, | |
434 | SoundId = "rbxassetid://" .. id, | |
435 | Parent = par or workspace, | |
436 | Looped = looped | |
437 | } | |
438 | wait() | |
439 | S:play() | |
440 | end)) | |
441 | end; | |
442 | }; | |
443 | ||
444 | ParticleEmitter = { | |
445 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
446 | local Particle = Create("ParticleEmitter"){ | |
447 | Parent = Parent, | |
448 | Color = ColorSequence.new(Color1, Color2), | |
449 | LightEmission = LightEmission, | |
450 | Size = Size, | |
451 | Texture = Texture, | |
452 | Transparency = Transparency, | |
453 | ZOffset = ZOffset, | |
454 | Acceleration = Accel, | |
455 | Drag = Drag, | |
456 | LockedToPart = LockedToPart, | |
457 | VelocityInheritance = VelocityInheritance, | |
458 | EmissionDirection = EmissionDirection, | |
459 | Enabled = Enabled, | |
460 | Lifetime = LifeTime, | |
461 | Rate = Rate, | |
462 | Rotation = Rotation, | |
463 | RotSpeed = RotSpeed, | |
464 | Speed = Speed, | |
465 | VelocitySpread = VelocitySpread, | |
466 | } | |
467 | return Particle | |
468 | end; | |
469 | }; | |
470 | ||
471 | CreateTemplate = { | |
472 | ||
473 | }; | |
474 | } | |
475 | ||
476 | --/v/Don't touch this part. \v\-- | |
477 | ||
478 | playlist=Instance.new("Sound", Torso) | |
479 | playlist.SoundId = "rbxassetid://" ..randString | |
480 | playlist.Volume = 5 | |
481 | playlist.Looped = false | |
482 | playlist.Name = "playlist" | |
483 | playlist:Play() | |
484 | ||
485 | --/^/Don't touch this part. \^\-- | |
486 | ||
487 | function RayCast(Position, Direction, Range, Ignore) | |
488 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
489 | end | |
490 | ||
491 | FindNearestTorso = function(pos) | |
492 | local list = (game.Workspace:children()) | |
493 | local torso = nil | |
494 | local dist = 1000 | |
495 | local temp, human, temp2 = nil, nil, nil | |
496 | for x = 1, #list do | |
497 | temp2 = list[x] | |
498 | if temp2.className == "Model" and temp2.Name ~= Character.Name then | |
499 | temp = temp2:findFirstChild("Torso") | |
500 | human = temp2:findFirstChild("Humanoid") | |
501 | if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then | |
502 | local dohit = true | |
503 | if dohit == true then | |
504 | torso = temp | |
505 | dist = (temp.Position - pos).magnitude | |
506 | end | |
507 | end | |
508 | end | |
509 | end | |
510 | return torso, dist | |
511 | end | |
512 | ||
513 | RootPart.CFrame = RootPart.CFrame * CFrame.new(0,5,0) | |
514 | ||
515 | Harness=CFuncs.Part.Create(m,Enum.Material.Plastic,0,1,"Medium stone grey","Harness",Vector3.new(0.420000285, 0.490000188, 0.399999768)) | |
516 | HarnessWeld=CFuncs.Weld.Create(m,Character["Torso"],Harness,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0500001907, -0.0350001119, -0.0871353149, -1, 0, 0, 0, 1, 0, 0, 0, -1)) | |
517 | FloatField2=CFuncs.Part.Create(m,Enum.Material.Neon,0,.5,"Lily white","FloatField2",Vector3.new(5, 8, 5)) | |
518 | FloatField2Weld=CFuncs.Weld.Create(m,Harness,FloatField2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(6.58035278e-05, 3.50000337e-05, 6.10351563e-05, -1, 0, 0, 0, 1, 0, 0, 0, -1)) | |
519 | flotemesh=CFuncs.Mesh.Create("SpecialMesh",FloatField2,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1)) | |
520 | spinny=CFuncs.Part.Create(Torso, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "spinny", Vector3.new()) | |
521 | spinny.Anchored=true | |
522 | spinny.CanCollide=false | |
523 | ||
524 | ||
525 | transp = .5 | |
526 | spawn(function() | |
527 | while true do | |
528 | transp = transp + .001 | |
529 | FloatField2.Transparency = transp | |
530 | swait() | |
531 | if transp >= 1 then | |
532 | transp = .5 | |
533 | end | |
534 | end | |
535 | end) | |
536 | ||
537 | ||
538 | ||
539 | function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
540 | if hit.Parent == nil then | |
541 | return | |
542 | end | |
543 | local h = hit.Parent:FindFirstChild("Humanoid") | |
544 | for _, v in pairs(hit.Parent:children()) do | |
545 | if v:IsA("Humanoid") then | |
546 | h = v | |
547 | end | |
548 | end | |
549 | if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
550 | if hit.Parent:findFirstChild("DebounceHit") ~= nil then | |
551 | if hit.Parent.DebounceHit.Value == true then | |
552 | return | |
553 | end | |
554 | end | |
555 | local c = Create("ObjectValue"){ | |
556 | Name = "creator", | |
557 | Value = game:service("Players").LocalPlayer, | |
558 | Parent = h, | |
559 | } | |
560 | game:GetService("Debris"):AddItem(c, .5) | |
561 | if HitSound ~= nil and HitPitch ~= nil then | |
562 | CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) | |
563 | end | |
564 | local Damage = math.random(minim, maxim) | |
565 | local blocked = false | |
566 | local block = hit.Parent:findFirstChild("Block") | |
567 | if block ~= nil then | |
568 | if block.className == "IntValue" then | |
569 | if block.Value > 0 then | |
570 | blocked = true | |
571 | block.Value = block.Value - 1 | |
572 | print(block.Value) | |
573 | end | |
574 | end | |
575 | end | |
576 | if blocked == false then | |
577 | h.Health = h.Health - Damage | |
578 | --ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color) | |
579 | else | |
580 | h.Health = h.Health - (Damage / 2) | |
581 | --ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color) | |
582 | end | |
583 | if Type == "Knockdown" then | |
584 | local hum = hit.Parent.Humanoid | |
585 | hum.PlatformStand = true | |
586 | coroutine.resume(coroutine.create(function(HHumanoid) | |
587 | swait(1) | |
588 | HHumanoid.PlatformStand = false | |
589 | end), hum) | |
590 | local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit | |
591 | local bodvol = Create("BodyVelocity"){ | |
592 | velocity = angle * knockback, | |
593 | P = 5000, | |
594 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
595 | Parent = hit, | |
596 | } | |
597 | local rl = Create("BodyAngularVelocity"){ | |
598 | P = 3000, | |
599 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
600 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
601 | Parent = hit, | |
602 | } | |
603 | game:GetService("Debris"):AddItem(bodvol, .5) | |
604 | game:GetService("Debris"):AddItem(rl, .5) | |
605 | elseif Type == "Normal" then | |
606 | local vp = Create("BodyVelocity"){ | |
607 | P = 10, | |
608 | maxForce = Vector3.new(math.huge, 0, math.huge), | |
609 | velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05, | |
610 | } | |
611 | print(hit.Parent) | |
612 | if knockback > 0 then | |
613 | vp.Parent = hit.Parent.Torso | |
614 | end | |
615 | local hum = hit.Parent.Humanoid | |
616 | hum.PlatformStand = true | |
617 | local TotalMass = 0 | |
618 | for _, part in pairs(hit.Parent:GetChildren()) do | |
619 | if part:IsA("Part") then | |
620 | TotalMass = TotalMass + part:GetMass() | |
621 | end | |
622 | end | |
623 | ||
624 | ||
625 | ||
626 | local ForceOfGravity = -197 * TotalMass | |
627 | local floatybits = Instance.new("BodyForce", hit.Parent.Torso) | |
628 | floatybits.force = Vector3.new(0, -ForceOfGravity, 0) | |
629 | ||
630 | ||
631 | ||
632 | ||
633 | ||
634 | ||
635 | spawn(function() | |
636 | local spinny2=CFuncs.Part.Create(Torso, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "spinny2", Vector3.new()) | |
637 | spinny2.Anchored=true | |
638 | spinny2.CanCollide=false | |
639 | for i = 0, 2, .001 do | |
640 | local alg = math.floor(playlist.PlaybackLoudness)/500 | |
641 | local alg2 = math.floor(playlist.PlaybackLoudness)/80 | |
642 | local efekt2=CFuncs.Part.Create(hit.Parent.Torso, "Neon", 0, .3, BrickColor.new(maincol2), "ref", Vector3.new(.05,alg2,.3)) | |
643 | efekt2.Anchored=true | |
644 | efekt2.CanCollide=false | |
645 | spinny2.CFrame = spinny2.CFrame * CFrame.fromEulerAnglesXYZ(0, math.pi/100, 0) | |
646 | spinny2.Position = hit.Parent.Torso.Position | |
647 | efekt2.CFrame=spinny2.CFrame*CFrame.new(aoeconstant-5,0,0) | |
648 | game:GetService("Debris"):AddItem(efekt2, .7) | |
649 | swait() | |
650 | end | |
651 | end) | |
652 | ||
653 | local rl = Create("BodyAngularVelocity"){ | |
654 | P = 500, | |
655 | maxTorque = Vector3.new(10, 10, 10), | |
656 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
657 | Parent = hit, | |
658 | } | |
659 | game:GetService("Debris"):AddItem(rl, 10) | |
660 | game:GetService("Debris"):AddItem(floatybits, 10) | |
661 | game:GetService("Debris"):AddItem(vp, .5) | |
662 | ||
663 | elseif Type == "Up" then | |
664 | local bodyVelocity = Create("BodyVelocity"){ | |
665 | velocity = Vector3.new(0, 20, 0), | |
666 | P = 5000, | |
667 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
668 | Parent = hit, | |
669 | } | |
670 | game:GetService("Debris"):AddItem(bodyVelocity, .5) | |
671 | elseif Type == "DarkUp" then | |
672 | coroutine.resume(coroutine.create(function() | |
673 | for i = 0, 1, 0.1 do | |
674 | swait() | |
675 | Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1) | |
676 | end | |
677 | end)) | |
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, 1) | |
685 | elseif Type == "Snare" then | |
686 | local bp = Create("BodyPosition"){ | |
687 | P = 2000, | |
688 | D = 100, | |
689 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
690 | position = hit.Parent.Torso.Position, | |
691 | Parent = hit.Parent.Torso, | |
692 | } | |
693 | game:GetService("Debris"):AddItem(bp, 1) | |
694 | elseif Type == "Freeze" then | |
695 | local BodPos = Create("BodyPosition"){ | |
696 | P = 50000, | |
697 | D = 1000, | |
698 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
699 | position = hit.Parent.Torso.Position, | |
700 | Parent = hit.Parent.Torso, | |
701 | } | |
702 | local BodGy = Create("BodyGyro") { | |
703 | maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge , | |
704 | P = 20e+003, | |
705 | Parent = hit.Parent.Torso, | |
706 | cf = hit.Parent.Torso.CFrame, | |
707 | } | |
708 | hit.Parent.Torso.Anchored = true | |
709 | coroutine.resume(coroutine.create(function(Part) | |
710 | swait(1.5) | |
711 | Part.Anchored = false | |
712 | end), hit.Parent.Torso) | |
713 | game:GetService("Debris"):AddItem(BodPos, 3) | |
714 | game:GetService("Debris"):AddItem(BodGy, 3) | |
715 | end | |
716 | local debounce = Create("BoolValue"){ | |
717 | Name = "DebounceHit", | |
718 | Parent = hit.Parent, | |
719 | Value = true, | |
720 | } | |
721 | game:GetService("Debris"):AddItem(debounce, Delay) | |
722 | c = Create("ObjectValue"){ | |
723 | Name = "creator", | |
724 | Value = Player, | |
725 | Parent = h, | |
726 | } | |
727 | game:GetService("Debris"):AddItem(c, .5) | |
728 | end | |
729 | end | |
730 | ||
731 | function ShowDamage(Pos, Text, Time, Color) | |
732 | local Rate = (1 / 60) | |
733 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
734 | local Text = (Text or "") | |
735 | local Time = (Time or 2) | |
736 | local Color = (Color or Color3.new(1, 0, 1)) | |
737 | local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
738 | EffectPart.Anchored = true | |
739 | local BillboardGui = Create("BillboardGui"){ | |
740 | Size = UDim2.new(3, 0, 3, 0), | |
741 | Adornee = EffectPart, | |
742 | Parent = EffectPart, | |
743 | } | |
744 | local TextLabel = Create("TextLabel"){ | |
745 | BackgroundTransparency = 1, | |
746 | Size = UDim2.new(1, 0, 1, 0), | |
747 | Text = Text, | |
748 | Font = "SourceSansLight", | |
749 | TextColor3 = Color, | |
750 | TextScaled = true, | |
751 | Parent = BillboardGui, | |
752 | } | |
753 | game.Debris:AddItem(EffectPart, (Time)) | |
754 | EffectPart.Parent = game:GetService("Workspace") | |
755 | delay(0, function() | |
756 | local Frames = (Time / Rate) | |
757 | for Frame = 1, Frames do | |
758 | wait(Rate) | |
759 | local Percent = (Frame / Frames) | |
760 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
761 | TextLabel.TextTransparency = Percent | |
762 | end | |
763 | if EffectPart and EffectPart.Parent then | |
764 | EffectPart:Destroy() | |
765 | end | |
766 | end) | |
767 | end | |
768 | ||
769 | function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch) | |
770 | for _, c in pairs(workspace:children()) do | |
771 | local hum = c:findFirstChild("Humanoid") | |
772 | if hum ~= nil then | |
773 | local head = c:findFirstChild("Torso") | |
774 | if head ~= nil then | |
775 | local targ = head.Position - Part.Position | |
776 | local mag = targ.magnitude | |
777 | if mag <= Magnitude and c.Name ~= Player.Name then | |
778 | Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, 10, "rbxassetid://" .. HitSound, HitPitch) | |
779 | end | |
780 | end | |
781 | end | |
782 | end | |
783 | end | |
784 | ||
785 | EffectModel = Create("Model"){ | |
786 | Parent = Character, | |
787 | Name = "EffectModel", | |
788 | } | |
789 | ||
790 | Effects = { | |
791 | Block = { | |
792 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type, Part) | |
793 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
794 | prt.Anchored = true | |
795 | prt.CFrame = cframe | |
796 | msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
797 | game:GetService("Debris"):AddItem(prt, 10) | |
798 | if Type == 1 or Type == nil then | |
799 | table.insert(Effects, { | |
800 | prt, | |
801 | "Block1", | |
802 | delay, | |
803 | x3, | |
804 | y3, | |
805 | z3, | |
806 | msh | |
807 | }) | |
808 | elseif Type == 2 then | |
809 | table.insert(Effects, { | |
810 | prt, | |
811 | "Block2", | |
812 | delay, | |
813 | x3, | |
814 | y3, | |
815 | z3, | |
816 | msh | |
817 | }) | |
818 | elseif Type == 3 then | |
819 | table.insert(Effects, { | |
820 | prt, | |
821 | "Block3", | |
822 | delay, | |
823 | x3, | |
824 | y3, | |
825 | z3, | |
826 | msh, | |
827 | Part | |
828 | }) | |
829 | elseif Type == 4 then | |
830 | table.insert(Effects, { | |
831 | prt, | |
832 | "Block2Fire", | |
833 | delay, | |
834 | x3, | |
835 | y3, | |
836 | z3, | |
837 | msh | |
838 | }) | |
839 | end | |
840 | end | |
841 | }; | |
842 | ||
843 | Sphere = { | |
844 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, parent) | |
845 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
846 | prt.Anchored = true | |
847 | prt.CFrame = cframe | |
848 | if parent == nil then | |
849 | prt.Parent = workspace | |
850 | else | |
851 | prt.Parent = parent | |
852 | end | |
853 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
854 | game:GetService("Debris"):AddItem(prt, 10) | |
855 | table.insert(Effects, { | |
856 | prt, | |
857 | "Cylinder", | |
858 | delay, | |
859 | x3, | |
860 | y3, | |
861 | z3, | |
862 | msh | |
863 | }) | |
864 | end | |
865 | }; | |
866 | ||
867 | Blood = { | |
868 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
869 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
870 | prt.Anchored = true | |
871 | prt.CFrame = cframe | |
872 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
873 | game:GetService("Debris"):AddItem(prt, 10) | |
874 | table.insert(Effects, { | |
875 | prt, | |
876 | "Blood", | |
877 | delay, | |
878 | x3, | |
879 | y3, | |
880 | z3, | |
881 | msh | |
882 | }) | |
883 | end | |
884 | }; | |
885 | ||
886 | Blast = { | |
887 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Part) | |
888 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
889 | prt.Anchored = true | |
890 | prt.CFrame = cframe | |
891 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "1323306", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
892 | game:GetService("Debris"):AddItem(prt, 10) | |
893 | table.insert(Effects, { | |
894 | prt, | |
895 | "Block4", | |
896 | delay, | |
897 | x3, | |
898 | y3, | |
899 | z3, | |
900 | msh, | |
901 | Part | |
902 | }) | |
903 | end | |
904 | }; | |
905 | ||
906 | Ring = { | |
907 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
908 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
909 | prt.Anchored = true | |
910 | prt.CFrame = cframe | |
911 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
912 | game:GetService("Debris"):AddItem(prt, 10) | |
913 | table.insert(Effects, { | |
914 | prt, | |
915 | "Cylinder", | |
916 | delay, | |
917 | x3, | |
918 | y3, | |
919 | z3, | |
920 | msh | |
921 | }) | |
922 | end | |
923 | }; | |
924 | ||
925 | Cylinder = { | |
926 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
927 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
928 | prt.Anchored = true | |
929 | prt.CFrame = cframe | |
930 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
931 | game:GetService("Debris"):AddItem(prt, 10) | |
932 | table.insert(Effects, { | |
933 | prt, | |
934 | "Cylinder", | |
935 | delay, | |
936 | x3, | |
937 | y3, | |
938 | z3, | |
939 | msh | |
940 | }) | |
941 | end | |
942 | }; | |
943 | ||
944 | Head = { | |
945 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
946 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
947 | prt.Anchored = true | |
948 | prt.CFrame = cframe | |
949 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
950 | game:GetService("Debris"):AddItem(prt, 10) | |
951 | table.insert(Effects, { | |
952 | prt, | |
953 | "Cylinder", | |
954 | delay, | |
955 | x3, | |
956 | y3, | |
957 | z3, | |
958 | msh | |
959 | }) | |
960 | end | |
961 | }; | |
962 | ||
963 | Wave = { | |
964 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
965 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
966 | prt.Anchored = true | |
967 | prt.CFrame = cframe | |
968 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
969 | game:GetService("Debris"):AddItem(prt, 10) | |
970 | table.insert(Effects, { | |
971 | prt, | |
972 | "Cylinder", | |
973 | delay, | |
974 | x3, | |
975 | y3, | |
976 | z3, | |
977 | msh | |
978 | }) | |
979 | end | |
980 | }; | |
981 | ||
982 | Break = { | |
983 | Create = function(brickcolor, cframe, x1, y1, z1) | |
984 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
985 | prt.Anchored = true | |
986 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
987 | game:GetService("Debris"):AddItem(prt, 10) | |
988 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
989 | local num = math.random(10, 50) / 1000 | |
990 | table.insert(Effects, { | |
991 | prt, | |
992 | "Shatter", | |
993 | num, | |
994 | prt.CFrame, | |
995 | math.random() - math.random(), | |
996 | 0, | |
997 | math.random(50, 100) / 100 | |
998 | }) | |
999 | end | |
1000 | }; | |
1001 | ||
1002 | Elec = { | |
1003 | Create = function(brickcolor, cff, x, y, z) | |
1004 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Part", Vector3.new(1, 1, 1)) | |
1005 | prt.Anchored = true | |
1006 | prt.CFrame = cff * CFrame.new(math.random(-x * 100, x * 100) / 100, math.random(-y * 100, y * 100) / 100, math.random(-z * 100, z * 100) / 100) | |
1007 | prt.CFrame = CFrame.new(prt.Position) | |
1008 | game:GetService("Debris"):AddItem(prt, 10) | |
1009 | xval = math.random() / 9 | |
1010 | yval = math.random() / 9 | |
1011 | zval = math.random() / 9 | |
1012 | msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval)) | |
1013 | eul1 = math.random(-50, 50) | |
1014 | eul2 = math.random(-50, 50) | |
1015 | eul3 = math.random(-50, 50) | |
1016 | euld = CFrame.fromEulerAnglesXYZ(eul1, eul2, eul3) | |
1017 | euld2 = CFrame.fromEulerAnglesXYZ(-eul1, -eul2, -eul3) | |
1018 | table.insert(Effects, { | |
1019 | prt, | |
1020 | "Elec", | |
1021 | .05, | |
1022 | x, | |
1023 | y, | |
1024 | z, | |
1025 | xval, | |
1026 | yval, | |
1027 | zval, | |
1028 | msh, | |
1029 | euld, | |
1030 | euld2 | |
1031 | }) | |
1032 | end | |
1033 | }; | |
1034 | ||
1035 | Elec2 = { | |
1036 | Create = function(brickcolor, cff, x, y, z) | |
1037 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Part", Vector3.new(1, 1, 1)) | |
1038 | prt.Anchored = true | |
1039 | prt.CFrame = cff * CFrame.new(math.random(-x * 100, x * 100) / 100, math.random(-y * 100, y * 100) / 100, math.random(-z * 100, z * 100) / 100) | |
1040 | prt.CFrame = CFrame.new(prt.Position) | |
1041 | game:GetService("Debris"):AddItem(prt, 10) | |
1042 | xval = math.random() / 7 | |
1043 | yval = math.random() / 7 | |
1044 | zval = math.random() / 7 | |
1045 | msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval)) | |
1046 | eul1 = math.random(-50, 50) | |
1047 | eul2 = math.random(-50, 50) | |
1048 | eul3 = math.random(-50, 50) | |
1049 | euld = CFrame.fromEulerAnglesXYZ(eul1, eul2, eul3) | |
1050 | euld2 = CFrame.fromEulerAnglesXYZ(-eul1, -eul2, -eul3) | |
1051 | table.insert(Effects, { | |
1052 | prt, | |
1053 | "Elec", | |
1054 | .1, | |
1055 | x, | |
1056 | y, | |
1057 | z, | |
1058 | xval, | |
1059 | yval, | |
1060 | zval, | |
1061 | msh, | |
1062 | euld, | |
1063 | euld2 | |
1064 | }) | |
1065 | end | |
1066 | }; | |
1067 | ||
1068 | Clone = { | |
1069 | Create = function() | |
1070 | for _, v in pairs(Torso.Parent:children()) do | |
1071 | if v.className == "Part" and v.Name ~= "HumanoidRootPart" then | |
1072 | local c = CFuncs.Part.Create(EffectModel, "Neon", 0, .5, BrickColor.new("Bright blue"), "Effect", v.Size) | |
1073 | c.Anchored = true | |
1074 | c.CFrame = v.CFrame | |
1075 | game:GetService("Debris"):AddItem(c, 5) | |
1076 | local cmsh = nil | |
1077 | if v.Name == "Head" then | |
1078 | cmsh = CFuncs.Mesh.Create("SpecialMesh", c, "Head", "", Vector3.new(0, 0, 0), v.Mesh.Scale) | |
1079 | else | |
1080 | cmsh = CFuncs.Mesh.Create("BlockMesh", c, "", "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1)) | |
1081 | end | |
1082 | table.insert(Effects, { | |
1083 | c, | |
1084 | "Cylinder", | |
1085 | 0.05, | |
1086 | 0.1, | |
1087 | 0.1, | |
1088 | 0.1, | |
1089 | cmsh | |
1090 | }) | |
1091 | end | |
1092 | end | |
1093 | end | |
1094 | }; | |
1095 | ||
1096 | EffectTemplate = { | |
1097 | ||
1098 | }; | |
1099 | } | |
1100 | ||
1101 | ||
1102 | ||
1103 | ||
1104 | ||
1105 | ||
1106 | ||
1107 | Mouse.Button1Down:connect(function() | |
1108 | if Mouse ~= nil then | |
1109 | if Mouse.Target ~= nil then | |
1110 | part = Mouse.Target | |
1111 | bp = Instance.new("BodyPosition",part) | |
1112 | bp.MaxForce = Vector3.new(5000,5000,5000) | |
1113 | bp.Position = part.Position | |
1114 | dwn = true | |
1115 | end | |
1116 | while dwn == true do | |
1117 | wait() | |
1118 | bp.Position = Mouse.hit.p | |
1119 | if part then | |
1120 | if part.Parent:FindFirstChildOfClass("Humanoid") then | |
1121 | part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true | |
1122 | end | |
1123 | end | |
1124 | end | |
1125 | end | |
1126 | end) | |
1127 | Mouse.Button1Up:connect(function() | |
1128 | dwn = false | |
1129 | if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end | |
1130 | if bp then bp:Destroy() end | |
1131 | end) | |
1132 | ||
1133 | ||
1134 | Mouse.KeyDown:connect(function(k) | |
1135 | k = k:lower() | |
1136 | if k == 'm' then | |
1137 | ShowDamage((Head.CFrame * CFrame.new(0, 0, (Head.Size.Z / 2)).p + Vector3.new(0, 5, 0)), quotes[math.random(#quotes)], 5, BrickColor.new(maincol2).Color) | |
1138 | playlist:Destroy() | |
1139 | playlist=Instance.new("Sound", Torso) | |
1140 | playlist.SoundId = "rbxassetid://" ..songs[math.random(#songs)] | |
1141 | playlist.Volume = 5 | |
1142 | playlist.Looped = false | |
1143 | playlist.Name = "playlist" | |
1144 | playlist:Play() | |
1145 | elseif k == 'n' and circleinthesky == false then | |
1146 | circleinthesky = true | |
1147 | elseif k == 'n' and circleinthesky == true then | |
1148 | circleinthesky = false | |
1149 | end | |
1150 | end) | |
1151 | ||
1152 | ||
1153 | ||
1154 | while true do | |
1155 | swait() | |
1156 | for i, v in pairs(Character:GetChildren()) do | |
1157 | if v:IsA("Part") then | |
1158 | v.Material = "SmoothPlastic" | |
1159 | elseif v:IsA("Accessory") then | |
1160 | v:WaitForChild("Handle").Material = "SmoothPlastic" | |
1161 | end | |
1162 | end | |
1163 | for i, v in pairs(Character:GetChildren()) do | |
1164 | if v:IsA'Model' then | |
1165 | for _, c in pairs(v:GetChildren()) do | |
1166 | if c:IsA'Part' then | |
1167 | c.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001) | |
1168 | end | |
1169 | end | |
1170 | end | |
1171 | end | |
1172 | if playlist.IsPlaying == false then | |
1173 | ShowDamage((Head.CFrame * CFrame.new(0, 0, (Head.Size.Z / 2)).p + Vector3.new(0, 5, 0)), quotes[math.random(#quotes)], 5, BrickColor.new(maincol2).Color) | |
1174 | playlist:Destroy() | |
1175 | playlist=Instance.new("Sound", Torso) | |
1176 | playlist.SoundId = "rbxassetid://" ..songs[math.random(#songs)] | |
1177 | playlist.Volume = 5 | |
1178 | playlist.Looped = false | |
1179 | playlist.Name = "playlist" | |
1180 | playlist:Play() | |
1181 | end | |
1182 | TorsoVelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
1183 | Velocity = RootPart.Velocity.y | |
1184 | Sine = Sine + Change | |
1185 | local hit, pos = RayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character) | |
1186 | if RootPart.Velocity.y > 1 and hit == nil then | |
1187 | Anim = "Jump" | |
1188 | if Attack == false then | |
1189 | Change = 1 | |
1190 | PlayAnimationFromTable({ | |
1191 | CFrame.new(0, 0, -0, 1, 0, -0, 0, 0.342019022, -0.939693093, 0, 0.939693093, 0.342018992) * CFrame.new(0, 0, 0 + .5 * math.cos(Sine/35)) * CFrame.Angles(.3 + .005 * math.cos(Sine/35), 0, 0), | |
1192 | CFrame.new(0, 1.4785918, -0.211434767, 1, 0, -0, 0, 0.98480767, 0.173649639, -0, -0.173649669, 0.984807611) * CFrame.new(0, 0, 0) * CFrame.Angles(0 + .05 * math.cos(Sine/35), 0, 0), | |
1193 | CFrame.new(0.939720154, 1.23436928, 0.449271917, 0.866025388, 0.500000238, 0, 0.469846785, -0.81379807, 0.342019022, 0.17100957, -0.296197116, -0.939693093) * CFrame.new(0, 0, 0 - .01 * math.cos(Sine/35)) * CFrame.Angles(0, 0, 0), | |
1194 | CFrame.new(-0.804059327, 1.1624434, 0.431921601, 0.866025269, -0.500000238, -1.92716968e-07, -0.492404282, -0.852868617, 0.173646882, -0.0868236423, -0.150382489, -0.984808087) * CFrame.new(0, 0, 0 - .01 * math.cos(Sine/35)) * CFrame.Angles(0, 0, 0), | |
1195 | CFrame.new(0.662806809, -1.42266583, -0.425317377, 0.999114633, -0.0274195503, -0.0319078304, 0.0249254964, 0.996788979, -0.0760965645, 0.0338919051, 0.0752338469, 0.996589839) * CFrame.new(0, 0, 0 - .1 * math.cos(Sine/40)) * CFrame.Angles(0 + .1 * math.cos(Sine/40), 0, 0), | |
1196 | CFrame.new(-0.358216971, -1.62964225, 0.259462059, 0.999541879, -0.0301539842, 0.0025981334, 0.0127545623, 0.497520745, 0.867358446, -0.027446935, -0.866927922, 0.497677386) * CFrame.new(0, 0, 0 - .2 * math.cos(Sine/35)) * CFrame.Angles(0 + .2 * math.cos(Sine/35), 0, 0), | |
1197 | }, .3, false) | |
1198 | MagnitudeDamage(Torso, aoeconstant, 0, 0, 0, "Normal", " ", .8) | |
1199 | end | |
1200 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
1201 | Anim = "Fall" | |
1202 | if Attack == false then | |
1203 | Change = 1 | |
1204 | PlayAnimationFromTable({ | |
1205 | CFrame.new(0, 0, -0, 1, 0, -0, 0, 0.342019022, -0.939693093, 0, 0.939693093, 0.342018992) * CFrame.new(0, 0, 0 + .5 * math.cos(Sine/35)) * CFrame.Angles(.3 + .005 * math.cos(Sine/35), 0, 0), | |
1206 | CFrame.new(0, 1.4785918, -0.211434767, 1, 0, -0, 0, 0.98480767, 0.173649639, -0, -0.173649669, 0.984807611) * CFrame.new(0, 0, 0) * CFrame.Angles(0 + .05 * math.cos(Sine/35), 0, 0), | |
1207 | CFrame.new(0.939720154, 1.23436928, 0.449271917, 0.866025388, 0.500000238, 0, 0.469846785, -0.81379807, 0.342019022, 0.17100957, -0.296197116, -0.939693093) * CFrame.new(0, 0, 0 - .01 * math.cos(Sine/35)) * CFrame.Angles(0, 0, 0), | |
1208 | CFrame.new(-0.804059327, 1.1624434, 0.431921601, 0.866025269, -0.500000238, -1.92716968e-07, -0.492404282, -0.852868617, 0.173646882, -0.0868236423, -0.150382489, -0.984808087) * CFrame.new(0, 0, 0 - .01 * math.cos(Sine/35)) * CFrame.Angles(0, 0, 0), | |
1209 | CFrame.new(0.662806809, -1.42266583, -0.425317377, 0.999114633, -0.0274195503, -0.0319078304, 0.0249254964, 0.996788979, -0.0760965645, 0.0338919051, 0.0752338469, 0.996589839) * CFrame.new(0, 0, 0 - .1 * math.cos(Sine/40)) * CFrame.Angles(0 + .1 * math.cos(Sine/40), 0, 0), | |
1210 | CFrame.new(-0.358216971, -1.62964225, 0.259462059, 0.999541879, -0.0301539842, 0.0025981334, 0.0127545623, 0.497520745, 0.867358446, -0.027446935, -0.866927922, 0.497677386) * CFrame.new(0, 0, 0 - .2 * math.cos(Sine/35)) * CFrame.Angles(0 + .2 * math.cos(Sine/35), 0, 0), | |
1211 | }, .3, false) | |
1212 | MagnitudeDamage(Torso, aoeconstant, 0, 0, 0, "Normal", " ", .8) | |
1213 | end | |
1214 | elseif TorsoVelocity < 1 and hit ~= nil then | |
1215 | Anim = "Idle" | |
1216 | if Attack == false then | |
1217 | Change = 1 | |
1218 | PlayAnimationFromTable({ | |
1219 | CFrame.new(0, 0, -0, 1, 0, -0, 0, 0.342019022, -0.939693093, 0, 0.939693093, 0.342018992) * CFrame.new(0, 0, 0 + .5 * math.cos(Sine/35)) * CFrame.Angles(.3 + .005 * math.cos(Sine/35), 0, 0), | |
1220 | CFrame.new(0, 1.4785918, -0.211434767, 1, 0, -0, 0, 0.98480767, 0.173649639, -0, -0.173649669, 0.984807611) * CFrame.new(0, 0, 0) * CFrame.Angles(0 + .1 * math.cos(Sine/35), 0, 0), | |
1221 | CFrame.new(0.939720154, 1.23436928, 0.449271917, 0.866025388, 0.500000238, 0, 0.469846785, -0.81379807, 0.342019022, 0.17100957, -0.296197116, -0.939693093) * CFrame.new(0, 0, 0 - .01 * math.cos(Sine/35)) * CFrame.Angles(0, 0, 0), | |
1222 | CFrame.new(-0.804059327, 1.1624434, 0.431921601, 0.866025269, -0.500000238, -1.92716968e-07, -0.492404282, -0.852868617, 0.173646882, -0.0868236423, -0.150382489, -0.984808087) * CFrame.new(0, 0, 0 - .01 * math.cos(Sine/35)) * CFrame.Angles(0, 0, 0), | |
1223 | CFrame.new(0.662806809, -1.42266583, -0.425317377, 0.999114633, -0.0274195503, -0.0319078304, 0.0249254964, 0.996788979, -0.0760965645, 0.0338919051, 0.0752338469, 0.996589839) * CFrame.new(0, 0, 0 - .1 * math.cos(Sine/40)) * CFrame.Angles(0 + .1 * math.cos(Sine/40), 0, 0), | |
1224 | CFrame.new(-0.358216971, -1.62964225, 0.259462059, 0.999541879, -0.0301539842, 0.0025981334, 0.0127545623, 0.497520745, 0.867358446, -0.027446935, -0.866927922, 0.497677386) * CFrame.new(0, 0, 0 - .2 * math.cos(Sine/35)) * CFrame.Angles(0 + .2 * math.cos(Sine/35), 0, 0), | |
1225 | }, .3, false) | |
1226 | MagnitudeDamage(Torso, aoeconstant, 0, 0, 0, "Normal", " ", .8) | |
1227 | end | |
1228 | elseif TorsoVelocity > 2 and hit ~= nil then | |
1229 | Anim = "Walk" | |
1230 | if Attack == false then | |
1231 | PlayAnimationFromTable({ | |
1232 | CFrame.new(0, 0, -0, 1, 0, -0, 0, 0.342019022, -0.939693093, 0, 0.939693093, 0.342018992) * CFrame.new(0, 0, 0 + .5 * math.cos(Sine/35)) * CFrame.Angles(.3 + .005 * math.cos(Sine/35), 0, 0), | |
1233 | CFrame.new(0, 1.4785918, -0.211434767, 1, 0, -0, 0, 0.98480767, 0.173649639, -0, -0.173649669, 0.984807611) * CFrame.new(0, 0, 0) * CFrame.Angles(0 + .05 * math.cos(Sine/35), 0, 0), | |
1234 | CFrame.new(0.939720154, 1.23436928, 0.449271917, 0.866025388, 0.500000238, 0, 0.469846785, -0.81379807, 0.342019022, 0.17100957, -0.296197116, -0.939693093) * CFrame.new(0, 0, 0 - .01 * math.cos(Sine/35)) * CFrame.Angles(0, 0, 0), | |
1235 | CFrame.new(-0.804059327, 1.1624434, 0.431921601, 0.866025269, -0.500000238, -1.92716968e-07, -0.492404282, -0.852868617, 0.173646882, -0.0868236423, -0.150382489, -0.984808087) * CFrame.new(0, 0, 0 - .01 * math.cos(Sine/35)) * CFrame.Angles(0, 0, 0), | |
1236 | CFrame.new(0.662806809, -1.42266583, -0.425317377, 0.999114633, -0.0274195503, -0.0319078304, 0.0249254964, 0.996788979, -0.0760965645, 0.0338919051, 0.0752338469, 0.996589839) * CFrame.new(0, 0, 0 - .1 * math.cos(Sine/40)) * CFrame.Angles(0 + .1 * math.cos(Sine/40), 0, 0), | |
1237 | CFrame.new(-0.358216971, -1.62964225, 0.259462059, 0.999541879, -0.0301539842, 0.0025981334, 0.0127545623, 0.497520745, 0.867358446, -0.027446935, -0.866927922, 0.497677386) * CFrame.new(0, 0, 0 - .2 * math.cos(Sine/35)) * CFrame.Angles(0 + .2 * math.cos(Sine/35), 0, 0), | |
1238 | }, .3, false) | |
1239 | MagnitudeDamage(Torso, aoeconstant, 0, 0, 0, "Normal", " ", .8) | |
1240 | end | |
1241 | end | |
1242 | if #Effects > 0 then | |
1243 | for e = 1, #Effects do | |
1244 | if Effects[e] ~= nil then | |
1245 | local Thing = Effects[e] | |
1246 | if Thing ~= nil then | |
1247 | local Part = Thing[1] | |
1248 | local Mode = Thing[2] | |
1249 | local Delay = Thing[3] | |
1250 | local IncX = Thing[4] | |
1251 | local IncY = Thing[5] | |
1252 | if Thing[1].Transparency <= 1 then | |
1253 | if Thing[2] == "Block1" then | |
1254 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1255 | Mesh = Thing[7] | |
1256 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1257 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1258 | elseif Thing[2] == "Ice" then | |
1259 | if Thing[6] <= Thing[5] then | |
1260 | Thing[6] = Thing[6] + .05 | |
1261 | Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, .4, 0) | |
1262 | else | |
1263 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1264 | end | |
1265 | elseif Thing[2] == "Shatter" then | |
1266 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1267 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
1268 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
1269 | Thing[6] = Thing[6] + Thing[5] | |
1270 | elseif Thing[2] == "Block2" then | |
1271 | Thing[1].CFrame = Thing[1].CFrame | |
1272 | Mesh = Thing[7] | |
1273 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1274 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1275 | elseif Thing[2] == "Block3" then | |
1276 | Thing[1].CFrame = Thing[8].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1277 | Mesh = Thing[7] | |
1278 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1279 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1280 | elseif Thing[2] == "Block4" then | |
1281 | Thing[1].CFrame = Thing[8].CFrame * CFrame.new(0, -Thing[7].Scale.Y, 0) * CFrame.fromEulerAnglesXYZ(3.14, 0, 0) | |
1282 | Mesh = Thing[7] | |
1283 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1284 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1285 | elseif Thing[2] == "Block2Fire" then | |
1286 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1287 | Mesh = Thing[7] | |
1288 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1289 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1290 | if Thing[1].Transparency >= .3 then | |
1291 | Thing[1].BrickColor = BrickColor.new("Bright red") | |
1292 | else | |
1293 | Thing[1].BrickColor = BrickColor.new("Bright yellow") | |
1294 | end | |
1295 | elseif Thing[2] == "Cylinder" then | |
1296 | Mesh = Thing[7] | |
1297 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1298 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1299 | elseif Thing[2] == "Blood" then | |
1300 | Mesh = Thing[7] | |
1301 | Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, -.5, 0) | |
1302 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1303 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1304 | elseif Thing[2] == "Elec" then | |
1305 | Mesh = Thing[10] | |
1306 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
1307 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1308 | Thing[1].CFrame = Thing[1].CFrame * Thing[11] * CFrame.new(0, 0, .2) | |
1309 | Thing[1].Rotation = Vector3.new(0, 0, 0) | |
1310 | elseif Thing[2] == "Disappear" then | |
1311 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1312 | end | |
1313 | else | |
1314 | Part.Parent = nil | |
1315 | table.remove(Effects, e) | |
1316 | end | |
1317 | end | |
1318 | end | |
1319 | end | |
1320 | end | |
1321 | local alg = math.floor(playlist.PlaybackLoudness)/500 | |
1322 | local alg2 = math.floor(playlist.PlaybackLoudness)/80 | |
1323 | ||
1324 | if circleinthesky == false then | |
1325 | FloatField2.BrickColor = BrickColor.new(maincol2) | |
1326 | spinny.Position = Torso.Position | |
1327 | spinny.CFrame = spinny.CFrame * CFrame.fromEulerAnglesXYZ(0, math.pi/100, 0) | |
1328 | efekt=CFuncs.Part.Create(Torso, "Neon", 0, .3, BrickColor.new(maincol2), "ref", Vector3.new(.05,alg2,.3)) | |
1329 | efekt.Anchored=true | |
1330 | efekt.CanCollide=false | |
1331 | game:GetService("Debris"):AddItem(efekt, .5) | |
1332 | --ShowDamage((efekt.CFrame * CFrame.new(0, 0, (Torso.Size.Z / 102)).p + Vector3.new(0, 0, 0)), ".", 1, BrickColor.new(maincol2).Color) | |
1333 | efekt.CFrame=spinny.CFrame*CFrame.new(aoeconstant,0,0) | |
1334 | ||
1335 | elseif circleinthesky == true then | |
1336 | ||
1337 | FloatField2.BrickColor = BrickColor.new(maincol2) | |
1338 | spinny.Position = Torso.Position | |
1339 | spinny.CFrame = spinny.CFrame * CFrame.fromEulerAnglesXYZ(0, math.pi/100, 0) | |
1340 | efekt=CFuncs.Part.Create(Torso, "Neon", 0, .3, BrickColor.new(maincol2), "ref", Vector3.new(1+alg2,.05,.3)) | |
1341 | efekt.Anchored=true | |
1342 | efekt.CanCollide=false | |
1343 | efekt2=CFuncs.Part.Create(Torso, "Neon", 0, .3, BrickColor.new(maincol2), "ref", Vector3.new(alg2,.05,.3)) | |
1344 | efekt2.Anchored=true | |
1345 | efekt2.CanCollide=false | |
1346 | game:GetService("Debris"):AddItem(efekt, 2) | |
1347 | game:GetService("Debris"):AddItem(efekt2, 2) | |
1348 | --ShowDamage((efekt.CFrame * CFrame.new(0, 0, (Torso.Size.Z / 102)).p + Vector3.new(0, 0, 0)), ".", 1, BrickColor.new(maincol2).Color) | |
1349 | efekt.CFrame=spinny.CFrame*CFrame.new(aoeconstant,20,0) | |
1350 | efekt2.CFrame=spinny.CFrame*CFrame.new(aoeconstant-4,10,0) | |
1351 | end | |
1352 | humanoid.Health = math.huge | |
1353 | soundbork(workspace) | |
1354 | end |