SHOW:
|
|
- or go back to the newest paste.
1 | - | --[[ |
1 | + | if game:GetService("RunService"):IsClient() then error("Please run as a server script. Use h/ instead of hl/.") end |
2 | print("FE Compatibility: by WaverlyCole & Mokiros") | |
3 | InternalData = {} | |
4 | do | |
5 | script.Parent = owner.Character | |
6 | local Event = Instance.new("RemoteEvent") | |
7 | Event.Name = "UserInput" | |
8 | local function NewFakeEvent() | |
9 | local Fake = {fakeEvent=true,Connect=function(self,Func)self.Function=Func end}Fake.connect = Fake.Connect | |
10 | return Fake | |
11 | end | |
12 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
13 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
14 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
15 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
16 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
17 | local function TriggerEvent(self,Event,...) | |
18 | local Trigger = Mouse[Event] | |
19 | if Trigger and Trigger.fakeEvent and Trigger.Function then | |
20 | Trigger.Function(...) | |
21 | end | |
22 | end | |
23 | Mouse.TrigEvent = TriggerEvent | |
24 | UserInputService.TrigEvent = TriggerEvent | |
25 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
26 | if FiredBy.Name ~= owner.Name then end | |
27 | if Input.MouseEvent then | |
28 | Mouse.Target = Input.Target | |
29 | Mouse.Hit = Input.Hit | |
30 | else | |
31 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
32 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then | |
33 | return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") | |
34 | end | |
35 | for _,Action in pairs(ContextActionService.Actions) do | |
36 | for _,Key in pairs(Action.Keys) do | |
37 | if Key==Input.KeyCode then | |
38 | Action.Function(Action.Name,Input.UserInputState,Input) | |
39 | end | |
40 | end | |
41 | end | |
42 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
43 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
44 | end | |
45 | end) | |
46 | InternalData["Mouse"] = Mouse | |
47 | InternalData["ContextActionService"] = ContextActionService | |
48 | InternalData["UserInputService"] = UserInputService | |
49 | Event.Parent = NLS([[ | |
50 | local Player = owner | |
51 | local Event = script:WaitForChild("UserInput") | |
52 | local UserInputService = game:GetService("UserInputService") | |
53 | local Mouse = Player:GetMouse() | |
54 | local Input = function(Input,gameProcessedEvent) | |
55 | if gameProcessedEvent then return end | |
56 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
57 | end | |
58 | UserInputService.InputBegan:Connect(Input) | |
59 | UserInputService.InputEnded:Connect(Input) | |
60 | local Hit,Target | |
61 | while wait(1/30) do | |
62 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
63 | Hit,Target = Mouse.Hit,Mouse.Target | |
64 | Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
65 | end | |
66 | end | |
67 | ]],owner.Character) | |
68 | end | |
69 | RealGame = game;game = setmetatable({},{ | |
70 | __index = function (self,Index) | |
71 | local Sandbox = function (Thing) | |
72 | if Thing:IsA("Player") then | |
73 | local RealPlayer = Thing | |
74 | return setmetatable({},{ | |
75 | __index = function (self,Index) | |
76 | local Type = type(RealPlayer[Index]) | |
77 | if Type == "function" then | |
78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
79 | return function (self) | |
80 | return InternalData["Mouse"] | |
81 | end | |
82 | end | |
83 | return function (self,...) | |
84 | return RealPlayer[Index](RealPlayer,...) | |
85 | end | |
86 | else | |
87 | return RealPlayer[Index] | |
88 | end | |
89 | end; | |
90 | __tostring = function(self) | |
91 | return RealPlayer.Name | |
92 | end | |
93 | }) | |
94 | end | |
95 | end | |
96 | if RealGame[Index] then | |
97 | local Type = type(RealGame[Index]) | |
98 | if Type == "function" then | |
99 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
100 | return function (self,Service) | |
101 | if Service:lower() == "players" then | |
102 | return setmetatable({},{ | |
103 | __index = function (self2,Index2) | |
104 | local RealService = RealGame:GetService(Service) | |
105 | local Type2 = type(Index2) | |
106 | if Type2 == "function" then | |
107 | return function (self,...) | |
108 | return RealService[Index2](RealService,...) | |
109 | end | |
110 | else | |
111 | if Index2:lower() == "localplayer" then | |
112 | return Sandbox(owner) | |
113 | end | |
114 | return RealService[Index2] | |
115 | end | |
116 | end; | |
117 | __tostring = function(self) | |
118 | return RealGame:GetService(Service).Name | |
119 | end | |
120 | }) | |
121 | elseif Service:lower() == "contextactionservice" then | |
122 | return InternalData["ContextActionService"] | |
123 | elseif Service:lower() == "contextactionservice" then | |
124 | return InternalData["UserInputService"] | |
125 | elseif Service:lower() == "runservice" then | |
126 | return setmetatable({},{ | |
127 | __index = function(self2,Index2) | |
128 | local RealService = RealGame:GetService(Service) | |
129 | local Type2 = type(Index2) | |
130 | if Type2 == "function" then | |
131 | return function (self,...) | |
132 | return RealService[Index2](RealService,...) | |
133 | end | |
134 | else | |
135 | if Index2:lower() == "bindtorenderstep" then | |
136 | return function (self,Name,Priority,Function) | |
137 | return RealGame:GetService("RunService").Stepped:Connect(Function) | |
138 | end | |
139 | end | |
140 | if Index2:lower() == "renderstepped" then | |
141 | return RealService["Stepped"] | |
142 | end | |
143 | return RealService[Index2] | |
144 | end | |
145 | end | |
146 | }) | |
147 | else | |
148 | return RealGame:GetService(Service) | |
149 | end | |
150 | end | |
151 | end | |
152 | return function (self,...) | |
153 | return RealGame[Index](RealGame,...) | |
154 | end | |
155 | else | |
156 | if game:GetService(Index) then | |
157 | return game:GetService(Index) | |
158 | end | |
159 | return RealGame[Index] | |
160 | end | |
161 | else | |
162 | return nil | |
163 | end | |
164 | end | |
165 | });Game = game;owner = game:GetService("Players").LocalPlayer | |
166 | print("Complete! Running... Created by Minty_latios ") | |
167 | ||
168 | ||
169 | ||
170 | SUN IS A DEADLY LASER SCRIPT | |
171 | { NOT ANYMORE THERE'S A BLANKET! } | |
172 | Created by Minty_Latios (ROBLOX) | |
173 | MintyLatios (V3rmillion) | |
174 | Minty Latios#1938 | |
175 | ||
176 | ||
177 | --]] | |
178 | wait(1 / 60) | |
179 | Effects = { } | |
180 | local Player = game.Players.localPlayer | |
181 | local Character = Player.Character | |
182 | local Humanoid = Character.Humanoid | |
183 | local Mouse = Player:GetMouse() | |
184 | local LeftArm = Character["Left Arm"] | |
185 | local RightArm = Character["Right Arm"] | |
186 | local LeftLeg = Character["Left Leg"] | |
187 | local RightLeg = Character["Right Leg"] | |
188 | local Head = Character.Head | |
189 | local Torso = Character.Torso | |
190 | local Camera = game.Workspace.CurrentCamera | |
191 | local RootPart = Character.HumanoidRootPart | |
192 | local RootJoint = RootPart.RootJoint | |
193 | local attack = false | |
194 | local Anim = 'Idle' | |
195 | local attacktype = 1 | |
196 | local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
197 | local velocity = RootPart.Velocity.y | |
198 | local sine = 0 | |
199 | local change = 1 | |
200 | local Create = LoadLibrary("RbxUtility").Create | |
201 | ||
202 | local m = Create("Model"){ | |
203 | Parent = Character, | |
204 | Name = "WeaponModel", | |
205 | } | |
206 | ||
207 | Humanoid.Animator.Parent = nil | |
208 | Character.Animate.Parent = nil | |
209 | ||
210 | local newMotor = function(part0, part1, c0, c1) | |
211 | local w = Create('Motor'){ | |
212 | Parent = part0, | |
213 | Part0 = part0, | |
214 | Part1 = part1, | |
215 | C0 = c0, | |
216 | C1 = c1, | |
217 | } | |
218 | return w | |
219 | end | |
220 | ||
221 | function clerp(a, b, t) | |
222 | return a:lerp(b, t) | |
223 | end | |
224 | ||
225 | RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
226 | NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
227 | ||
228 | local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0)) | |
229 | local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0)) | |
230 | local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0)) | |
231 | local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0)) | |
232 | RootJoint.C1 = CFrame.new(0, 0, 0) | |
233 | RootJoint.C0 = CFrame.new(0, 0, 0) | |
234 | Torso.Neck.C1 = CFrame.new(0, 0, 0) | |
235 | Torso.Neck.C0 = CFrame.new(0, 1.5, 0) | |
236 | ||
237 | local rarmc1 = RW.C1 | |
238 | local larmc1 = LW.C1 | |
239 | local rlegc1 = RH.C1 | |
240 | local llegc1 = LH.C1 | |
241 | ||
242 | local resetc1 = false | |
243 | ||
244 | function PlayAnimationFromTable(table, speed, bool) | |
245 | RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) | |
246 | Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) | |
247 | RW.C0 = clerp(RW.C0, table[3], speed) | |
248 | LW.C0 = clerp(LW.C0, table[4], speed) | |
249 | RH.C0 = clerp(RH.C0, table[5], speed) | |
250 | LH.C0 = clerp(LH.C0, table[6], speed) | |
251 | if bool == true then | |
252 | if resetc1 == false then | |
253 | resetc1 = true | |
254 | RootJoint.C1 = RootJoint.C1 | |
255 | Torso.Neck.C1 = Torso.Neck.C1 | |
256 | RW.C1 = rarmc1 | |
257 | LW.C1 = larmc1 | |
258 | RH.C1 = rlegc1 | |
259 | LH.C1 = llegc1 | |
260 | end | |
261 | end | |
262 | end | |
263 | ||
264 | ArtificialHB = Create("BindableEvent", script){ | |
265 | Parent = script, | |
266 | Name = "Heartbeat", | |
267 | } | |
268 | ||
269 | script:WaitForChild("Heartbeat") | |
270 | ||
271 | frame = 1 / 30 | |
272 | tf = 0 | |
273 | allowframeloss = false | |
274 | tossremainder = false | |
275 | lastframe = tick() | |
276 | script.Heartbeat:Fire() | |
277 | ||
278 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
279 | tf = tf + s | |
280 | if tf >= frame then | |
281 | if allowframeloss then | |
282 | script.Heartbeat:Fire() | |
283 | lastframe = tick() | |
284 | else | |
285 | for i = 1, math.floor(tf / frame) do | |
286 | script.Heartbeat:Fire() | |
287 | end | |
288 | lastframe = tick() | |
289 | end | |
290 | if tossremainder then | |
291 | tf = 0 | |
292 | else | |
293 | tf = tf - frame * math.floor(tf / frame) | |
294 | end | |
295 | end | |
296 | end) | |
297 | ||
298 | function swait(num) | |
299 | if num == 0 or num == nil then | |
300 | ArtificialHB.Event:wait() | |
301 | else | |
302 | for i = 0, num do | |
303 | ArtificialHB.Event:wait() | |
304 | end | |
305 | end | |
306 | end | |
307 | ||
308 | function RemoveOutlines(part) | |
309 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
310 | end | |
311 | ||
312 | CFuncs = { | |
313 | ["Part"] = { | |
314 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
315 | local Part = Create("Part"){ | |
316 | Parent = Parent, | |
317 | Reflectance = Reflectance, | |
318 | Transparency = Transparency, | |
319 | CanCollide = false, | |
320 | Locked = true, | |
321 | BrickColor = BrickColor.new(tostring(BColor)), | |
322 | Name = Name, | |
323 | Size = Size, | |
324 | Material = Material, | |
325 | } | |
326 | RemoveOutlines(Part) | |
327 | return Part | |
328 | end; | |
329 | }; | |
330 | ||
331 | ["Mesh"] = { | |
332 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
333 | local Msh = Create(Mesh){ | |
334 | Parent = Part, | |
335 | Offset = OffSet, | |
336 | Scale = Scale, | |
337 | } | |
338 | if Mesh == "SpecialMesh" then | |
339 | Msh.MeshType = MeshType | |
340 | Msh.MeshId = MeshId | |
341 | end | |
342 | return Msh | |
343 | end; | |
344 | }; | |
345 | ||
346 | ["Mesh"] = { | |
347 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
348 | local Msh = Create(Mesh){ | |
349 | Parent = Part, | |
350 | Offset = OffSet, | |
351 | Scale = Scale, | |
352 | } | |
353 | if Mesh == "SpecialMesh" then | |
354 | Msh.MeshType = MeshType | |
355 | Msh.MeshId = MeshId | |
356 | end | |
357 | return Msh | |
358 | end; | |
359 | }; | |
360 | ||
361 | ["Weld"] = { | |
362 | Create = function(Parent, Part0, Part1, C0, C1) | |
363 | local Weld = Create("Weld"){ | |
364 | Parent = Parent, | |
365 | Part0 = Part0, | |
366 | Part1 = Part1, | |
367 | C0 = C0, | |
368 | C1 = C1, | |
369 | } | |
370 | return Weld | |
371 | end; | |
372 | }; | |
373 | ||
374 | ["Sound"] = { | |
375 | Create = function(id, par, vol, pit) | |
376 | coroutine.resume(coroutine.create(function() | |
377 | local S = Create("Sound"){ | |
378 | Volume = vol, | |
379 | Pitch = pit or 1, | |
380 | SoundId = id, | |
381 | Parent = par or workspace, | |
382 | } | |
383 | wait() | |
384 | S:play() | |
385 | game:GetService("Debris"):AddItem(S, 6) | |
386 | end)) | |
387 | end; | |
388 | }; | |
389 | ||
390 | ["ParticleEmitter"] = { | |
391 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
392 | local fp = Create("ParticleEmitter"){ | |
393 | Parent = Parent, | |
394 | Color = ColorSequence.new(Color1, Color2), | |
395 | LightEmission = LightEmission, | |
396 | Size = Size, | |
397 | Texture = Texture, | |
398 | Transparency = Transparency, | |
399 | ZOffset = ZOffset, | |
400 | Acceleration = Accel, | |
401 | Drag = Drag, | |
402 | LockedToPart = LockedToPart, | |
403 | VelocityInheritance = VelocityInheritance, | |
404 | EmissionDirection = EmissionDirection, | |
405 | Enabled = Enabled, | |
406 | Lifetime = LifeTime, | |
407 | Rate = Rate, | |
408 | Rotation = Rotation, | |
409 | RotSpeed = RotSpeed, | |
410 | Speed = Speed, | |
411 | VelocitySpread = VelocitySpread, | |
412 | } | |
413 | return fp | |
414 | end; | |
415 | }; | |
416 | ||
417 | CreateTemplate = { | |
418 | ||
419 | }; | |
420 | } | |
421 | ||
422 | function rayCast(Position, Direction, Range, Ignore) | |
423 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
424 | end | |
425 | ||
426 | FindNearestTorso = function(pos) | |
427 | local list = (game.Workspace:children()) | |
428 | local torso = nil | |
429 | local dist = 1000 | |
430 | local temp, human, temp2 = nil, nil, nil | |
431 | for x = 1, #list do | |
432 | temp2 = list[x] | |
433 | if temp2.className == "Model" and temp2.Name ~= Character.Name then | |
434 | temp = temp2:findFirstChild("Torso") | |
435 | human = temp2:findFirstChild("Humanoid") | |
436 | if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then | |
437 | local dohit = true | |
438 | if dohit == true then | |
439 | torso = temp | |
440 | dist = (temp.Position - pos).magnitude | |
441 | end | |
442 | end | |
443 | end | |
444 | end | |
445 | return torso, dist | |
446 | end | |
447 | ||
448 | function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
449 | if hit.Parent == nil then | |
450 | return | |
451 | end | |
452 | local h = hit.Parent:FindFirstChild("Humanoid") | |
453 | for _, v in pairs(hit.Parent:children()) do | |
454 | if v:IsA("Humanoid") then | |
455 | h = v | |
456 | end | |
457 | end | |
458 | if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
459 | if hit.Parent:findFirstChild("DebounceHit") ~= nil then | |
460 | if hit.Parent.DebounceHit.Value == true then | |
461 | return | |
462 | end | |
463 | end | |
464 | local c = Create("ObjectValue"){ | |
465 | Name = "creator", | |
466 | Value = game:service("Players").LocalPlayer, | |
467 | Parent = h, | |
468 | } | |
469 | game:GetService("Debris"):AddItem(c, .5) | |
470 | if HitSound ~= nil and HitPitch ~= nil then | |
471 | CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) | |
472 | end | |
473 | local Damage = math.random(minim, maxim) | |
474 | local blocked = false | |
475 | local block = hit.Parent:findFirstChild("Block") | |
476 | if block ~= nil then | |
477 | if block.className == "IntValue" then | |
478 | if block.Value > 0 then | |
479 | blocked = true | |
480 | block.Value = block.Value - 1 | |
481 | print(block.Value) | |
482 | end | |
483 | end | |
484 | end | |
485 | if blocked == false then | |
486 | h.Health = h.Health - Damage | |
487 | 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) | |
488 | else | |
489 | h.Health = h.Health - (Damage / 2) | |
490 | 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) | |
491 | end | |
492 | if Type == "Knockdown" then | |
493 | local hum = hit.Parent.Humanoid | |
494 | hum.PlatformStand = true | |
495 | coroutine.resume(coroutine.create(function(HHumanoid) | |
496 | swait(1) | |
497 | HHumanoid.PlatformStand = false | |
498 | end), hum) | |
499 | local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit | |
500 | local bodvol = Create("BodyVelocity"){ | |
501 | velocity = angle * knockback, | |
502 | P = 5000, | |
503 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
504 | Parent = hit, | |
505 | } | |
506 | local rl = Create("BodyAngularVelocity"){ | |
507 | P = 3000, | |
508 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
509 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
510 | Parent = hit, | |
511 | } | |
512 | game:GetService("Debris"):AddItem(bodvol, .5) | |
513 | game:GetService("Debris"):AddItem(rl, .5) | |
514 | elseif Type == "Normal" then | |
515 | local vp = Create("BodyVelocity"){ | |
516 | P = 500, | |
517 | maxForce = Vector3.new(math.huge, 0, math.huge), | |
518 | velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05, | |
519 | } | |
520 | if knockback > 0 then | |
521 | vp.Parent = hit.Parent.Torso | |
522 | end | |
523 | game:GetService("Debris"):AddItem(vp, .5) | |
524 | elseif Type == "Up" then | |
525 | local bodyVelocity = Create("BodyVelocity"){ | |
526 | velocity = Vector3.new(0, 20, 0), | |
527 | P = 5000, | |
528 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
529 | Parent = hit, | |
530 | } | |
531 | game:GetService("Debris"):AddItem(bodyVelocity, .5) | |
532 | elseif Type == "DarkUp" then | |
533 | coroutine.resume(coroutine.create(function() | |
534 | for i = 0, 1, 0.1 do | |
535 | swait() | |
536 | Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1) | |
537 | end | |
538 | end)) | |
539 | local bodyVelocity = Create("BodyVelocity"){ | |
540 | velocity = Vector3.new(0, 20, 0), | |
541 | P = 5000, | |
542 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
543 | Parent = hit, | |
544 | } | |
545 | game:GetService("Debris"):AddItem(bodyVelocity, 1) | |
546 | elseif Type == "Snare" then | |
547 | local bp = Create("BodyPosition"){ | |
548 | P = 2000, | |
549 | D = 100, | |
550 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
551 | position = hit.Parent.Torso.Position, | |
552 | Parent = hit.Parent.Torso, | |
553 | } | |
554 | game:GetService("Debris"):AddItem(bp, 1) | |
555 | elseif Type == "Freeze" then | |
556 | local BodPos = Create("BodyPosition"){ | |
557 | P = 50000, | |
558 | D = 1000, | |
559 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
560 | position = hit.Parent.Torso.Position, | |
561 | Parent = hit.Parent.Torso, | |
562 | } | |
563 | local BodGy = Create("BodyGyro") { | |
564 | maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge , | |
565 | P = 20e+003, | |
566 | Parent = hit.Parent.Torso, | |
567 | cframe = hit.Parent.Torso.CFrame, | |
568 | } | |
569 | hit.Parent.Torso.Anchored = true | |
570 | coroutine.resume(coroutine.create(function(Part) | |
571 | swait(1.5) | |
572 | Part.Anchored = false | |
573 | end), hit.Parent.Torso) | |
574 | game:GetService("Debris"):AddItem(BodPos, 3) | |
575 | game:GetService("Debris"):AddItem(BodGy, 3) | |
576 | end | |
577 | local debounce = Create("BoolValue"){ | |
578 | Name = "DebounceHit", | |
579 | Parent = hit.Parent, | |
580 | Value = true, | |
581 | } | |
582 | game:GetService("Debris"):AddItem(debounce, Delay) | |
583 | c = Create("ObjectValue"){ | |
584 | Name = "creator", | |
585 | Value = Player, | |
586 | Parent = h, | |
587 | } | |
588 | game:GetService("Debris"):AddItem(c, .5) | |
589 | end | |
590 | end | |
591 | ||
592 | function ShowDamage(Pos, Text, Time, Color) | |
593 | local Rate = (1 / 30) | |
594 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
595 | local Text = (Text or "") | |
596 | local Time = (Time or 2) | |
597 | local Color = (Color or Color3.new(1, 0, 1)) | |
598 | local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
599 | EffectPart.Anchored = true | |
600 | local BillboardGui = Create("BillboardGui"){ | |
601 | Size = UDim2.new(3, 0, 3, 0), | |
602 | Adornee = EffectPart, | |
603 | Parent = EffectPart, | |
604 | } | |
605 | local TextLabel = Create("TextLabel"){ | |
606 | BackgroundTransparency = 1, | |
607 | Size = UDim2.new(1, 0, 1, 0), | |
608 | Text = Text, | |
609 | Font = "SciFi", | |
610 | TextColor3 = Color, | |
611 | TextScaled = true, | |
612 | Parent = BillboardGui, | |
613 | } | |
614 | game.Debris:AddItem(EffectPart, (Time)) | |
615 | EffectPart.Parent = game:GetService("Workspace") | |
616 | delay(0, function() | |
617 | local Frames = (Time / Rate) | |
618 | for Frame = 1, Frames do | |
619 | wait(Rate) | |
620 | local Percent = (Frame / Frames) | |
621 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
622 | TextLabel.TextTransparency = Percent | |
623 | end | |
624 | if EffectPart and EffectPart.Parent then | |
625 | EffectPart:Destroy() | |
626 | end | |
627 | end) | |
628 | end | |
629 | ||
630 | function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch) | |
631 | for _, c in pairs(workspace:children()) do | |
632 | local hum = c:findFirstChild("Humanoid") | |
633 | if hum ~= nil then | |
634 | local head = c:findFirstChild("Torso") | |
635 | if head ~= nil then | |
636 | local targ = head.Position - Part.Position | |
637 | local mag = targ.magnitude | |
638 | if mag <= Magnitude and c.Name ~= Player.Name then | |
639 | Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, .1, "rbxassetid://" .. HitSound, HitPitch) | |
640 | end | |
641 | end | |
642 | end | |
643 | end | |
644 | end | |
645 | ||
646 | EffectModel = Create("Model"){ | |
647 | Parent = Character, | |
648 | Name = "Effects", | |
649 | } | |
650 | ||
651 | Humanoid.WalkSpeed = 0 | |
652 | Humanoid.JumpPower = 0 | |
653 | ||
654 | CFuncs['Sound'].Create("rbxassetid://836740253",Character,10,1) | |
655 | attack = true | |
656 | ||
657 | New = function(Object, Parent, Name, Data) | |
658 | local Object = Instance.new(Object) | |
659 | for Index, Value in pairs(Data or {}) do | |
660 | Object[Index] = Value | |
661 | end | |
662 | Object.Parent = Parent | |
663 | Object.Name = Name | |
664 | return Object | |
665 | end | |
666 | ||
667 | Deadly = New("Model",Torso,"Deadly",{}) | |
668 | Sun = New("Part",Deadly,"Sun",{BrickColor = BrickColor.new("New Yeller"),Material = Enum.Material.Neon,Size = Vector3.new(0.5, 0.5, 0.5),CFrame = CFrame.new(-128.325043, 6.92500401, -88.5550079, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 1, 0),}) | |
669 | SunWeld = New("Weld",Sun,"Weld",{Part0 = Sun,Part1 = Torso,C0 = CFrame.new(0,10,-10)}) | |
670 | Mesh = New("SpecialMesh",Sun,"Mesh",{Scale = Vector3.new(25, 25, 25),MeshType = Enum.MeshType.Sphere,}) | |
671 | ||
672 | ||
673 | wait(2.4) | |
674 | for i = 0, 5, .1 do | |
675 | swait() | |
676 | PlayAnimationFromTable({ | |
677 | CFrame.new(0, -0, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
678 | CFrame.new(7.62939453e-06, 1.49997127, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
679 | CFrame.new(1.49998116, 1.30000138, -0, -0.925471961, -0.378816098, -0, 0.378816068, -0.925472021, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
680 | CFrame.new(-1.49998665, -7.67409801e-07, 0, 0.996534884, 0.083175458, -0, -0.0831753537, 0.996536195, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
681 | CFrame.new(0.500002444, -1.99997056, 0, 0.997888863, -0.0649460033, -0, 0.0649460033, 0.997888863, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
682 | CFrame.new(-0.499981999, -1.99997056, 0, 0.998180926, 0.0602900013, -0, -0.0602900013, 0.998180926, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
683 | }, .1, false) | |
684 | SunWeld.C0 = clerp(SunWeld.C0, CFrame.new(0,-15,-10), 0.1) | |
685 | end | |
686 | wait(0.5) | |
687 | Humanoid.WalkSpeed = 19 | |
688 | Humanoid.JumpPower = 75 | |
689 | attack = false | |
690 | ||
691 | Effects = { | |
692 | Block = { | |
693 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
694 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
695 | prt.Anchored = true | |
696 | prt.CFrame = cframe | |
697 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
698 | game:GetService("Debris"):AddItem(prt, 10) | |
699 | if Type == 1 or Type == nil then | |
700 | table.insert(Effects, { | |
701 | prt, | |
702 | "Block1", | |
703 | delay, | |
704 | x3, | |
705 | y3, | |
706 | z3, | |
707 | msh | |
708 | }) | |
709 | elseif Type == 2 then | |
710 | table.insert(Effects, { | |
711 | prt, | |
712 | "Block2", | |
713 | delay, | |
714 | x3, | |
715 | y3, | |
716 | z3, | |
717 | msh | |
718 | }) | |
719 | end | |
720 | end; | |
721 | }; | |
722 | ||
723 | Cylinder = { | |
724 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
725 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
726 | prt.Anchored = true | |
727 | prt.CFrame = cframe | |
728 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
729 | game:GetService("Debris"):AddItem(prt, 10) | |
730 | table.insert(Effects, { | |
731 | prt, | |
732 | "Cylinder", | |
733 | delay, | |
734 | x3, | |
735 | y3, | |
736 | z3, | |
737 | msh | |
738 | }) | |
739 | end; | |
740 | }; | |
741 | Head = { | |
742 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
743 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
744 | prt.Anchored = true | |
745 | prt.CFrame = cframe | |
746 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
747 | game:GetService("Debris"):AddItem(prt, 10) | |
748 | table.insert(Effects, { | |
749 | prt, | |
750 | "Cylinder", | |
751 | delay, | |
752 | x3, | |
753 | y3, | |
754 | z3, | |
755 | msh | |
756 | }) | |
757 | end; | |
758 | }; | |
759 | ||
760 | Sphere = { | |
761 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
762 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
763 | prt.Anchored = true | |
764 | prt.CFrame = cframe | |
765 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
766 | game:GetService("Debris"):AddItem(prt, 10) | |
767 | table.insert(Effects, { | |
768 | prt, | |
769 | "Cylinder", | |
770 | delay, | |
771 | x3, | |
772 | y3, | |
773 | z3, | |
774 | msh | |
775 | }) | |
776 | end; | |
777 | }; | |
778 | ||
779 | Elect = { | |
780 | Create = function(cff, x, y, z) | |
781 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1)) | |
782 | prt.Anchored = true | |
783 | prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z)) | |
784 | prt.CFrame = CFrame.new(prt.Position) | |
785 | game:GetService("Debris"):AddItem(prt, 2) | |
786 | local xval = math.random() / 2 | |
787 | local yval = math.random() / 2 | |
788 | local zval = math.random() / 2 | |
789 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval)) | |
790 | table.insert(Effects, { | |
791 | prt, | |
792 | "Elec", | |
793 | 0.1, | |
794 | x, | |
795 | y, | |
796 | z, | |
797 | xval, | |
798 | yval, | |
799 | zval | |
800 | }) | |
801 | end; | |
802 | ||
803 | }; | |
804 | ||
805 | Ring = { | |
806 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
807 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
808 | prt.Anchored = true | |
809 | prt.CFrame = cframe | |
810 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
811 | game:GetService("Debris"):AddItem(prt, 10) | |
812 | table.insert(Effects, { | |
813 | prt, | |
814 | "Cylinder", | |
815 | delay, | |
816 | x3, | |
817 | y3, | |
818 | z3, | |
819 | msh | |
820 | }) | |
821 | end; | |
822 | }; | |
823 | ||
824 | ||
825 | Wave = { | |
826 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
827 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
828 | prt.Anchored = true | |
829 | prt.CFrame = cframe | |
830 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
831 | game:GetService("Debris"):AddItem(prt, 10) | |
832 | table.insert(Effects, { | |
833 | prt, | |
834 | "Cylinder", | |
835 | delay, | |
836 | x3, | |
837 | y3, | |
838 | z3, | |
839 | msh | |
840 | }) | |
841 | end; | |
842 | }; | |
843 | ||
844 | Break = { | |
845 | Create = function(brickcolor, cframe, x1, y1, z1) | |
846 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
847 | prt.Anchored = true | |
848 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
849 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
850 | local num = math.random(10, 50) / 1000 | |
851 | game:GetService("Debris"):AddItem(prt, 10) | |
852 | table.insert(Effects, { | |
853 | prt, | |
854 | "Shatter", | |
855 | num, | |
856 | prt.CFrame, | |
857 | math.random() - math.random(), | |
858 | 0, | |
859 | math.random(50, 100) / 100 | |
860 | }) | |
861 | end; | |
862 | }; | |
863 | ||
864 | Fire = { | |
865 | Create = function(brickcolor, cframe, x1, y1, z1, delay) | |
866 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
867 | prt.Anchored = true | |
868 | prt.CFrame = cframe | |
869 | msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
870 | game:GetService("Debris"):AddItem(prt, 10) | |
871 | table.insert(Effects, { | |
872 | prt, | |
873 | "Fire", | |
874 | delay, | |
875 | 1, | |
876 | 1, | |
877 | 1, | |
878 | msh | |
879 | }) | |
880 | end; | |
881 | }; | |
882 | ||
883 | FireWave = { | |
884 | Create = function(brickcolor, cframe, x1, y1, z1) | |
885 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new()) | |
886 | prt.Anchored = true | |
887 | prt.CFrame = cframe | |
888 | msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
889 | local d = Create("Decal"){ | |
890 | Parent = prt, | |
891 | Texture = "rbxassetid://26356434", | |
892 | Face = "Top", | |
893 | } | |
894 | local d = Create("Decal"){ | |
895 | Parent = prt, | |
896 | Texture = "rbxassetid://26356434", | |
897 | Face = "Bottom", | |
898 | } | |
899 | game:GetService("Debris"):AddItem(prt, 10) | |
900 | table.insert(Effects, { | |
901 | prt, | |
902 | "FireWave", | |
903 | 1, | |
904 | 30, | |
905 | math.random(400, 600) / 100, | |
906 | msh | |
907 | }) | |
908 | end; | |
909 | }; | |
910 | ||
911 | Lightning = { | |
912 | Create = function(p0, p1, tym, ofs, col, th, tra, last) | |
913 | local magz = (p0 - p1).magnitude | |
914 | local curpos = p0 | |
915 | local trz = { | |
916 | -ofs, | |
917 | ofs | |
918 | } | |
919 | for i = 1, tym do | |
920 | local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym)) | |
921 | local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)]) | |
922 | local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz | |
923 | li.Material = "Neon" | |
924 | if tym == i then | |
925 | local magz2 = (curpos - p1).magnitude | |
926 | li.Size = Vector3.new(th, th, magz2) | |
927 | li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2) | |
928 | table.insert(Effects, { | |
929 | li, | |
930 | "Disappear", | |
931 | last | |
932 | }) | |
933 | else | |
934 | do | |
935 | do | |
936 | li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2) | |
937 | curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p | |
938 | game.Debris:AddItem(li, 10) | |
939 | table.insert(Effects, { | |
940 | li, | |
941 | "Disappear", | |
942 | last | |
943 | }) | |
944 | end | |
945 | end | |
946 | end | |
947 | end | |
948 | end | |
949 | }; | |
950 | ||
951 | EffectTemplate = { | |
952 | ||
953 | }; | |
954 | } | |
955 | ||
956 | function supernova() | |
957 | attack = true | |
958 | for i = 0, 1, 0.1 do | |
959 | swait() | |
960 | PlayAnimationFromTable({ | |
961 | CFrame.new(0, -0, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
962 | CFrame.new(7.62939453e-06, 1.49997127, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
963 | CFrame.new(1.49998248, 1.03999865, 1.31132779e-07, -0.874934673, -0.48424086, -8.74230253e-08, 0.48424086, -0.874934673, 2.16521015e-13, -7.64895418e-08, -4.23336139e-08, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
964 | CFrame.new(-1.45997405, 1.03999221, 0, -0.85547322, 0.5178473, -0, -0.517847538, -0.855473042, 0, 0, -0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
965 | CFrame.new(0.500002444, -1.99997056, 0, 0.997888863, -0.0649460033, -0, 0.0649460033, 0.997888863, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
966 | CFrame.new(-0.499981999, -1.99997056, 0, 0.998180926, 0.0602900013, -0, -0.0602900013, 0.998180926, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
967 | }, .3, false) | |
968 | end | |
969 | wait(.5) | |
970 | for i = 0, 5, .1 do | |
971 | Mesh.Scale = Mesh.Scale + Vector3.new(2,2,2) | |
972 | swait() | |
973 | end | |
974 | -- | |
975 | coroutine.wrap(function() | |
976 | repeat swait() | |
977 | Mesh.Scale = Mesh.Scale + Vector3.new(2,2,2) | |
978 | until nil | |
979 | end)() | |
980 | --CFuncs['Sound'].Create("rbxassetid://265492506",Character,10,1) | |
981 | local a = Instance.new("ColorCorrectionEffect",game:service'Lighting') | |
982 | a.TintColor = Color3.new(1,1,1) | |
983 | local b = Instance.new("BlurEffect",game:service'Lighting') | |
984 | b.Size = 0 | |
985 | ||
986 | for i = 1,0,-.1 do | |
987 | b.Size = b.Size + .5 | |
988 | a.TintColor = Color3.new(1,1,i) | |
989 | wait() | |
990 | end | |
991 | wait(1) | |
992 | ||
993 | ||
994 | for i = 1,0,-.1 do | |
995 | a.TintColor = Color3.new(1,i,0) | |
996 | b.Size = b.Size + 1 | |
997 | wait() | |
998 | end | |
999 | ||
1000 | wait(1) | |
1001 | ||
1002 | for i = 1,0,-.1 do | |
1003 | a.TintColor = Color3.new(i,0,0) | |
1004 | wait() | |
1005 | end | |
1006 | wait(1) | |
1007 | ||
1008 | coroutine.wrap(function() | |
1009 | for i,v in next, workspace:children() do | |
1010 | if v:IsA"Model" or v:IsA"Part" then | |
1011 | if v:FindFirstChildOfClass"Humanoid"then | |
1012 | v:BreakJoints() | |
1013 | end | |
1014 | end | |
1015 | end | |
1016 | end)() | |
1017 | wait(1) | |
1018 | ||
1019 | for i = 0,1,.1 do | |
1020 | a.TintColor = Color3.new(1,1,i) | |
1021 | b.Size = b.Size - 2 | |
1022 | wait() | |
1023 | end | |
1024 | ||
1025 | a:destroy() | |
1026 | game:service'Debris':AddItem(b,3) | |
1027 | end | |
1028 | function attackone() | |
1029 | CFuncs['Sound'].Create("rbxassetid://811841430",Character,10,1) | |
1030 | local a = Instance.new("Part",Character) | |
1031 | a.Name = "Lazer" | |
1032 | a.Anchored = true | |
1033 | a.CanCollide = false | |
1034 | a.BrickColor = BrickColor.new"New Yeller" | |
1035 | local ray = Ray.new( | |
1036 | Sun.CFrame.p, -- origin | |
1037 | (Mouse.Hit.p - Sun.CFrame.p).unit * 500 -- direction | |
1038 | ) | |
1039 | local ignore = Character | |
1040 | local hit, position, normal = workspace:FindPartOnRay(ray, ignore) | |
1041 | if hit then | |
1042 | local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid") | |
1043 | ||
1044 | if not humanoid then | |
1045 | humanoid = hit.Parent.Parent:FindFirstChildOfClass("Humanoid") | |
1046 | end | |
1047 | if humanoid then | |
1048 | if humanoid.Parent:IsA"Model" then | |
1049 | humanoid.Parent:BreakJoints() | |
1050 | end | |
1051 | end | |
1052 | end | |
1053 | a.BottomSurface = 10 | |
1054 | a.TopSurface = 10 | |
1055 | local distance = (Sun.CFrame.p - position).magnitude | |
1056 | a.Size = Vector3.new(1, 1, distance) | |
1057 | a.CFrame = CFrame.new(Sun.CFrame.p, position) * CFrame.new(0, 0, -distance / 2) | |
1058 | game:GetService("Debris"):AddItem(a, 0.1) | |
1059 | end | |
1060 | ||
1061 | Mouse.Button1Down:connect(function() | |
1062 | if attack == false and attacktype == 1 then | |
1063 | attackone() | |
1064 | end | |
1065 | end) | |
1066 | ||
1067 | ||
1068 | Mouse.KeyDown:connect(function(k) | |
1069 | if attack == false and k == 'v' then | |
1070 | supernova() | |
1071 | end | |
1072 | end) | |
1073 | while true do | |
1074 | swait() | |
1075 | for i, v in pairs(Character:GetChildren()) do | |
1076 | if v:IsA("Part") then | |
1077 | v.Material = "SmoothPlastic" | |
1078 | elseif v:IsA("Accessory") then | |
1079 | v:WaitForChild("Handle").Material = "SmoothPlastic" | |
1080 | end | |
1081 | end | |
1082 | Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
1083 | velocity = RootPart.Velocity.y | |
1084 | sine = sine + change | |
1085 | local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character) | |
1086 | if RootPart.Velocity.y > 1 and hit == nil then | |
1087 | Anim = "Jump" | |
1088 | if attack == false then | |
1089 | PlayAnimationFromTable({ | |
1090 | CFrame.new(0, 0, 0, 1, -2.21689355e-12, -5.11591203e-13, -2.21689355e-12, 1, 7.74860496e-07, -5.11591203e-13, 7.74860496e-07, 1.00000048) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1091 | CFrame.new(-0.0579944476, 1.48445117, -0.000906195492, 0.999631822, -0.0259140469, -0.00804444961, 0.0262291897, 0.998776913, 0.0419151038, 0.0069484422, -0.0421099029, 0.999089062) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1092 | CFrame.new(1.68067598, 0.167780995, 5.50026158e-08, 0.965881884, -0.258982956, -3.41060513e-13, 0.258982956, 0.965881884, 4.47034836e-07, 8.49010675e-08, 3.16640808e-07, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1093 | CFrame.new(-1.67620921, 0.188169807, -3.04922651e-07, 0.95698452, 0.290146649, -2.61441073e-07, -0.290146649, 0.95698452, -1.0069979e-05, -2.89639524e-06, 1.04542296e-05, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1094 | CFrame.new(0.537238836, -1.93797374, 0.176598221, 0.998698533, -0.0506777391, -0.00574572897, 0.0510024093, 0.992341697, 0.112511501, -6.35704041e-08, -0.112657718, 0.993634105) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1095 | CFrame.new(-0.536944568, -1.94808352, 0.126473114, 0.998626292, 0.0520468242, 0.00521374354, -0.0523067154, 0.993665218, 0.0995327011, -3.84102691e-07, -0.099668026, 0.995023906) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1096 | }, .3, false) | |
1097 | end | |
1098 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
1099 | Anim = "Fall" | |
1100 | if attack == false then | |
1101 | PlayAnimationFromTable({ | |
1102 | CFrame.new(0, 0, 0, 1, -2.21689355e-12, -5.11591203e-13, -2.21689355e-12, 1, 7.74860496e-07, -5.11591203e-13, 7.74860496e-07, 1.00000048) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1103 | CFrame.new(-0.0576509275, 1.50532985, -0.129091382, 0.999631822, -0.0231846143, -0.0140984114, 0.0262298863, 0.958684564, 0.283279002, 0.00694822101, -0.283544153, 0.958935201) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1104 | CFrame.new(1.68622994, 0.21415168, 7.02040666e-08, 0.881990671, -0.471266806, -3.41060513e-13, 0.471266806, 0.881990671, 4.47034836e-07, 1.54493137e-07, 2.89139166e-07, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1105 | CFrame.new(-1.72513735, 0.240890861, 2.54038241e-07, 0.814108491, 0.58071363, -2.61430017e-07, -0.580713034, 0.814108849, -1.00698489e-05, -6.08482924e-06, 8.98058715e-06, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1106 | CFrame.new(0.536720514, -1.92783141, 0.223740995, 0.998698533, -0.0498600565, -0.0107376017, 0.0510031059, 0.976314366, 0.210260883, -3.04512355e-07, -0.210534185, 0.977587521) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1107 | CFrame.new(-0.535922825, -1.92850935, 0.222419083, 0.99863112, 0.0512506701, 0.0104565797, -0.0523065142, 0.978474379, 0.199629858, -3.7062793e-07, -0.199902818, 0.97981596) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1108 | }, .3, false) | |
1109 | end | |
1110 | elseif Torsovelocity < 1 and hit ~= nil then | |
1111 | Anim = "Idle" | |
1112 | if attack == false then | |
1113 | change = 1 | |
1114 | PlayAnimationFromTable({ | |
1115 | CFrame.new(0, -0, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1116 | CFrame.new(7.62939453e-06, 1.49997127, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(math.sin(sine/22)/12,0,0), | |
1117 | CFrame.new(0.429973245, 0.490001738, -0.460011989, 0.0975494087, 0.994276762, -0.0435587466, 0.0559796244, -0.0491798446, -0.997221529, -0.993656218, 0.0948399603, -0.0604567304) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, math.sin(sine/16)/10, math.sin(sine/16)/10), | |
1118 | CFrame.new(-0.320005357, 0.480002224, -0.539992452, 0.357028693, -0.930425704, -0.0826981664, -0.130211353, 0.0380947962, -0.990754068, 0.924973309, 0.364495993, -0.107551016) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, -math.sin(sine/16)/10, -math.sin(sine/16)/10), | |
1119 | CFrame.new(0.500002444, -1.99997056, 0, 0.997888863, -0.0649460033, -0, 0.0649460033, 0.997888863, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1120 | CFrame.new(-0.499981999, -1.99997056, 0, 0.998180926, 0.0602900013, -0, -0.0602900013, 0.998180926, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1121 | }, .3, false) | |
1122 | ||
1123 | end | |
1124 | elseif Torsovelocity > 2 and hit ~= nil then | |
1125 | Anim = "Walk" | |
1126 | if attack == false then | |
1127 | PlayAnimationFromTable({ | |
1128 | CFrame.new(0, 0, 0, 1, -2.21689355e-12, -5.11591203e-13, -2.21689355e-12, 1, 7.74860496e-07, -5.11591203e-13, 7.74860496e-07, 1.00000048) * CFrame.new(0, 0- .08 * math.cos((sine) / 3), 0) * CFrame.Angles(0, 0, 0), | |
1129 | CFrame.new(-0.0595112406, 1.55331731, -0.0425721854, 0.999631822, -0.0248252042, -0.010953242, 0.0262294486, 0.987443328, 0.155781403, 0.00694842171, -0.156010598, 0.987731278) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1130 | CFrame.new(0.429973245, 0.490001738, -0.460011989, 0.0975494087, 0.994276762, -0.0435587466, 0.0559796244, -0.0491798446, -0.997221529, -0.993656218, 0.0948399603, -0.0604567304) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, math.sin(sine/16)/10, math.sin(sine/16)/10), | |
1131 | CFrame.new(-0.320005357, 0.480002224, -0.539992452, 0.357028693, -0.930425704, -0.0826981664, -0.130211353, 0.0380947962, -0.990754068, 0.924973309, 0.364495993, -0.107551016) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, -math.sin(sine/16)/10, -math.sin(sine/16)/10), | |
1132 | CFrame.new(0.540300786, -1.99793816, -9.82598067e-07, 0.998698533, -0.0510031395, 6.36324955e-07, 0.0510031395, 0.998698533, -1.00461093e-05, -8.35937328e-08, 1.08393433e-05, 1.00000024) * CFrame.new(0, 0, 0+ .5 * math.cos((sine) / 6)) * CFrame.Angles(math.rad(0 - 30 * math.cos((sine) / 6)), 0, 0), | |
1133 | CFrame.new(-0.539563596, -1.99794078, 1.12228372e-06, 0.998635888, 0.0523072146, -1.77852357e-07, -0.0523072146, 0.998635888, -1.00715051e-05, -3.89727461e-07, 1.08406466e-05, 1.00000024) * CFrame.new(0, 0, 0- .5 * math.cos((sine) / 6)) * CFrame.Angles(math.rad(0 + 30 * math.cos((sine) / 6)), 0, 0), | |
1134 | }, .3, false) | |
1135 | end | |
1136 | end | |
1137 | if 0 < #Effects then | |
1138 | for e = 1, #Effects do | |
1139 | if Effects[e] ~= nil then | |
1140 | local Thing = Effects[e] | |
1141 | if Thing ~= nil then | |
1142 | local Part = Thing[1] | |
1143 | local Mode = Thing[2] | |
1144 | local Delay = Thing[3] | |
1145 | local IncX = Thing[4] | |
1146 | local IncY = Thing[5] | |
1147 | local IncZ = Thing[6] | |
1148 | if Thing[2] == "Shoot" then | |
1149 | local Look = Thing[1] | |
1150 | local move = 30 | |
1151 | if Thing[8] == 3 then | |
1152 | move = 10 | |
1153 | end | |
1154 | local hit, pos = rayCast(Thing[4], Thing[1], move, m) | |
1155 | if Thing[10] ~= nil then | |
1156 | da = pos | |
1157 | cf2 = CFrame.new(Thing[4], Thing[10].Position) | |
1158 | cfa = CFrame.new(Thing[4], pos) | |
1159 | tehCF = cfa:lerp(cf2, 0.2) | |
1160 | Thing[1] = tehCF.lookVector | |
1161 | end | |
1162 | local mag = (Thing[4] - pos).magnitude | |
1163 | Effects["Head"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 1, mag * 5, 1, 0.5, 0, 0.5, 0.2) | |
1164 | if Thing[8] == 2 then | |
1165 | Effects["Ring"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0) * CFrame.fromEulerAnglesXYZ(1.57, 0, 0), 1, 1, 0.1, 0.5, 0.5, 0.1, 0.1, 1) | |
1166 | end | |
1167 | Thing[4] = Thing[4] + Look * move | |
1168 | Thing[3] = Thing[3] - 1 | |
1169 | if 2 < Thing[5] then | |
1170 | Thing[5] = Thing[5] - 0.3 | |
1171 | Thing[6] = Thing[6] - 0.3 | |
1172 | end | |
1173 | if hit ~= nil then | |
1174 | Thing[3] = 0 | |
1175 | if Thing[8] == 1 or Thing[8] == 3 then | |
1176 | Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1) | |
1177 | else | |
1178 | if Thing[8] == 2 then | |
1179 | Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1) | |
1180 | if (hit.Parent:findFirstChild("Humanoid")) ~= nil or (hit.Parent.Parent:findFirstChild("Humanoid")) ~= nil then | |
1181 | ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new()) | |
1182 | ref.Anchored = true | |
1183 | ref.CFrame = CFrame.new(pos) | |
1184 | CFuncs["Sound"].Create("161006093", ref, 1, 1.2) | |
1185 | game:GetService("Debris"):AddItem(ref, 0.2) | |
1186 | Effects["Block"].Create(Torso.BrickColor, CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 10, 10, 10, 0.1, 2) | |
1187 | Effects["Ring"].Create(BrickColor.new("Bright yellow"), CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 0.1, 4, 4, 0.1, 0.1) | |
1188 | MagnitudeDamage(ref, 15, Thing[5] / 1.5, Thing[6] / 1.5, 0, "Normal", "", 1) | |
1189 | end | |
1190 | end | |
1191 | end | |
1192 | ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new()) | |
1193 | ref.Anchored = true | |
1194 | ref.CFrame = CFrame.new(pos) | |
1195 | Effects["Sphere"].Create(Torso.BrickColor, CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07) | |
1196 | game:GetService("Debris"):AddItem(ref, 1) | |
1197 | end | |
1198 | if Thing[3] <= 0 then | |
1199 | table.remove(Effects, e) | |
1200 | end | |
1201 | end | |
1202 | do | |
1203 | do | |
1204 | if Thing[2] == "FireWave" then | |
1205 | if Thing[3] <= Thing[4] then | |
1206 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0) | |
1207 | Thing[3] = Thing[3] + 1 | |
1208 | Thing[6].Scale = Thing[6].Scale + Vector3.new(Thing[5], 0, Thing[5]) | |
1209 | else | |
1210 | Part.Parent = nil | |
1211 | table.remove(Effects, e) | |
1212 | end | |
1213 | end | |
1214 | if Thing[2] ~= "Shoot" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" then | |
1215 | if Thing[1].Transparency <= 1 then | |
1216 | if Thing[2] == "Block1" then | |
1217 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1218 | Mesh = Thing[7] | |
1219 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1220 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1221 | else | |
1222 | if Thing[2] == "Block2" then | |
1223 | Thing[1].CFrame = Thing[1].CFrame | |
1224 | Mesh = Thing[7] | |
1225 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1226 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1227 | else | |
1228 | if Thing[2] == "Fire" then | |
1229 | Thing[1].CFrame = CFrame.new(Thing[1].Position) + Vector3.new(0, 0.2, 0) | |
1230 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1231 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1232 | else | |
1233 | if Thing[2] == "Cylinder" then | |
1234 | Mesh = Thing[7] | |
1235 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1236 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1237 | else | |
1238 | if Thing[2] == "Blood" then | |
1239 | Mesh = Thing[7] | |
1240 | Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0) | |
1241 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1242 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1243 | else | |
1244 | if Thing[2] == "Elec" then | |
1245 | Mesh = Thing[10] | |
1246 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
1247 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1248 | else | |
1249 | if Thing[2] == "Disappear" then | |
1250 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1251 | else | |
1252 | if Thing[2] == "Shatter" then | |
1253 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1254 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
1255 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
1256 | Thing[6] = Thing[6] + Thing[5] | |
1257 | end | |
1258 | end | |
1259 | end | |
1260 | end | |
1261 | end | |
1262 | end | |
1263 | end | |
1264 | end | |
1265 | else | |
1266 | Part.Parent = nil | |
1267 | table.remove(Effects, e) | |
1268 | end | |
1269 | end | |
1270 | end | |
1271 | end | |
1272 | end | |
1273 | end | |
1274 | end | |
1275 | end | |
1276 | end |