SHOW:
|
|
- or go back to the newest paste.
1 | -- Created by Nebula_Zorua Edit by PowerSans1234 -- | |
2 | -- Your DETERMINATION -- | |
3 | - | -- Y o u a c t l i k e y o u h a v e a c h o i c e. =) -- |
3 | + | -- Sonic Edit -- |
4 | - | -- Discord: Nebula the Zorua#6969 |
4 | + | -- Discord: PowerSans1234#3410 -- |
5 | - | -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA |
5 | + | |
6 | ||
7 | --// Initializing \\-- | |
8 | local S = setmetatable({},{__index = function(s,i) return game:service(i) end}) | |
9 | local Plrs = S.Players | |
10 | local Plr = Plrs.LocalPlayer | |
11 | local Char = Plr.Character | |
12 | local Hum = Char:FindFirstChildOfClass'Humanoid' | |
13 | local RArm = Char["Right Arm"] | |
14 | local LArm = Char["Left Arm"] | |
15 | local RLeg = Char["Right Leg"] | |
16 | local LLeg = Char["Left Leg"] | |
17 | local Root = Char:FindFirstChild'HumanoidRootPart' | |
18 | local Torso = Char.Torso | |
19 | local Head = Char.Head | |
20 | local NeutralAnims = true | |
21 | local Attack = false | |
22 | local BloodPuddles = {} | |
23 | local Effects = {} | |
24 | local Debounces = {Debounces={}} | |
25 | local Mouse = Plr:GetMouse() | |
26 | local Hit = {} | |
27 | local Sine = 0 | |
28 | local Change = 1 | |
29 | local Souls = 0 | |
30 | --// Debounce System \\-- | |
31 | ||
32 | ||
33 | function Debounces:New(name,cooldown) | |
34 | local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0} | |
35 | setmetatable(aaaaa,{__index = Debounces}) | |
36 | Debounces.Debounces[name] = aaaaa | |
37 | return aaaaa | |
38 | end | |
39 | ||
40 | function Debounces:Use(overrideUsable) | |
41 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
42 | if(self.Usable or overrideUsable)then | |
43 | self.Usable = false | |
44 | self.CoolingDown = true | |
45 | local LastUse = time() | |
46 | self.LastUse = LastUse | |
47 | delay(self.Cooldown or 2,function() | |
48 | if(self.LastUse == LastUse)then | |
49 | self.CoolingDown = false | |
50 | self.Usable = true | |
51 | end | |
52 | end) | |
53 | end | |
54 | end | |
55 | ||
56 | function Debounces:Get(name) | |
57 | assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name))) | |
58 | for i,v in next, Debounces.Debounces do | |
59 | if(i == name)then | |
60 | return v; | |
61 | end | |
62 | end | |
63 | end | |
64 | ||
65 | function Debounces:GetProgressPercentage() | |
66 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
67 | if(self.CoolingDown and not self.Usable)then | |
68 | return math.max( | |
69 | math.floor( | |
70 | ( | |
71 | (time()-self.LastUse)/self.Cooldown or 2 | |
72 | )*100 | |
73 | ) | |
74 | ) | |
75 | else | |
76 | return 100 | |
77 | end | |
78 | end | |
79 | ||
80 | --// Shortcut Variables \\-- | |
81 | local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ} | |
82 | local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV} | |
83 | local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis} | |
84 | local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end} | |
85 | local R3 = {N=Region3.new} | |
86 | local De = S.Debris | |
87 | local WS = workspace | |
88 | local Lght = S.Lighting | |
89 | local RepS = S.ReplicatedStorage | |
90 | local IN = Instance.new | |
91 | local CSK = ColorSequenceKeypoint.new | |
92 | local CS = ColorSequence.new | |
93 | --// Instance Creation Functions \\-- | |
94 | ||
95 | function Sound(parent,id,pitch,volume,looped,effect,autoPlay) | |
96 | local Sound = IN("Sound") | |
97 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
98 | Sound.Pitch = pitch or 1 | |
99 | Sound.Volume = volume or 1 | |
100 | Sound.Looped = looped or false | |
101 | if(autoPlay)then | |
102 | coroutine.wrap(function() | |
103 | repeat wait() until Sound.IsLoaded | |
104 | Sound.Playing = autoPlay or false | |
105 | end)() | |
106 | end | |
107 | if(not looped and effect)then | |
108 | Sound.Stopped:connect(function() | |
109 | Sound.Volume = 0 | |
110 | Sound:destroy() | |
111 | end) | |
112 | elseif(effect)then | |
113 | warn("Sound can't be looped and a sound effect!") | |
114 | end | |
115 | Sound.Parent =parent or Torso | |
116 | return Sound | |
117 | end | |
118 | function Part(parent,color,material,size,cframe,anchored,cancollide) | |
119 | local part = IN("Part") | |
120 | part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0) | |
121 | part.Material = (material or Enum.Material.SmoothPlastic) | |
122 | part.TopSurface,part.BottomSurface=10,10 | |
123 | part.Size = (size or V3.N(1,1,1)) | |
124 | part.CFrame = (cframe or CF.N(0,0,0)) | |
125 | part.Anchored = (anchored or false) | |
126 | part.CanCollide = (cancollide or false) | |
127 | part.Parent = (parent or Char) | |
128 | return part | |
129 | end | |
130 | function Mesh(parent,meshtype,meshid,textid,scale,offset) | |
131 | local part = IN("SpecialMesh") | |
132 | part.MeshId = meshid or "" | |
133 | part.TextureId = textid or "" | |
134 | part.Scale = scale or V3.N(1,1,1) | |
135 | part.Offset = offset or V3.N(0,0,0) | |
136 | part.MeshType = meshtype or Enum.MeshType.Sphere | |
137 | part.Parent = parent | |
138 | return part | |
139 | end | |
140 | ||
141 | NewInstance = function(instance,parent,properties) | |
142 | local inst = Instance.new(instance,parent) | |
143 | if(properties)then | |
144 | for i,v in next, properties do | |
145 | pcall(function() inst[i] = v end) | |
146 | end | |
147 | end | |
148 | return inst; | |
149 | end | |
150 | ||
151 | ||
152 | ||
153 | --// Extended ROBLOX tables \\-- | |
154 | local Instance = setmetatable({ClearChildrenOfClass = function(where,class,recursive) local children = (recursive and where:GetDescendants() or where:GetChildren()) for _,v in next, children do if(v:IsA(class))then v:destroy();end;end;end},{__index = Instance}) | |
155 | --// Customization \\-- | |
156 | ||
157 | local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this | |
158 | local Remove_Hats = false | |
159 | local Remove_Clothing = true | |
160 | local PlayerSize = 1 | |
161 | local DamageColor = BrickColor.new'Really blue' | |
162 | - | local DamageColor = BrickColor.new'Really black' |
162 | + | local MusicID = 1 |
163 | - | local MusicID = 144931167 |
163 | + | local WalkSpeed = 20 |
164 | - | local WalkSpeed = 18 |
164 | + | |
165 | local MaxHealth = 500 | |
166 | ||
167 | ||
168 | if(_G.RefusedAnimation == nil) then _G.RefusedAnimation = false end | |
169 | ||
170 | --// Weapon and GUI creation, and Character Customization \\-- | |
171 | ||
172 | if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end | |
173 | if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end | |
174 | local Effects = IN("Folder",Char) | |
175 | Effects.Name = "Effects" | |
176 | ||
177 | Hum.MaxHealth = MaxHealth | |
178 | Hum.Health = MaxHealth | |
179 | ||
180 | local Knife = NewInstance("Part",Char,{Name='Knife',Size=V3.N(.4,3,.7),Anchored=false,CanCollide=false,Locked=true,Archivable=false,Reflectance=.01,Color=C3.N(0,0,0)}) | |
181 | local KnifeMesh = Mesh(Knife,Enum.MeshType.FileMesh,"rbxassetid://1","rbxassetid://3",V3.N(1,1,1),V3.N()) | |
182 | local AuraEmitter = NewInstance("ParticleEmitter",Knife,{EmissionDirection='Back',Color=CS{CSK(0,C3.N(1,0,0)),CSK(0.5,C3.N(1,1,0)),CSK(1,C3.RGB(255,191,0))},LightEmission=.5,LightInfluence=0,Size=NumberSequence.new(0.3),Texture="rbxassetid://1",Transparency=NumberSequence.new(0,1),LockedToPart=true,Lifetime=NumberRange.new(1),Rate=150,Speed=NumberRange.new(0)}) | |
183 | local FireEmitter = NewInstance("ParticleEmitter",Knife,{EmissionDirection='Back',Color=CS(C3.N(1,0,0),C3.N(1,0,0)),LightEmission=.5,LightInfluence=0,Size=NumberSequence.new{NumberSequenceKeypoint.new(0,.5,0),NumberSequenceKeypoint.new(0.755,0,0),NumberSequenceKeypoint.new(1,0,0)},Texture="rbxassetid://1",Transparency=NumberSequence.new(0.35,1),Lifetime=NumberRange.new(1,2),Rate=150,Speed=NumberRange.new(3)}) | |
184 | ||
185 | local KTrail = NewInstance("Trail",Knife,{ | |
186 | Attachment0=NewInstance("Attachment",Knife,{Position=V3.N(0,-.4,0)}), | |
187 | Attachment1=NewInstance("Attachment",Knife,{Position=V3.N(0,1.2,0)}), | |
188 | Color=CS(C3.N(1,0,0)), | |
189 | Enabled=false, | |
190 | Transparency=NumberSequence.new(0,1), | |
191 | Lifetime=1.25, | |
192 | }) | |
193 | ||
194 | ||
195 | ||
196 | Hum.DisplayDistanceType = 'None' | |
197 | ||
198 | local naeeym2 = IN("BillboardGui",Char) | |
199 | naeeym2.AlwaysOnTop = true | |
200 | naeeym2.Size = UDim2.new(5,35,2,15) | |
201 | naeeym2.StudsOffset = V3.N(0,2.5,0) | |
202 | naeeym2.Adornee = Char.Head | |
203 | naeeym2.Name = "Name" | |
204 | naeeym2.PlayerToHideFrom = Plr | |
205 | local tecks2 = IN("TextLabel",naeeym2) | |
206 | tecks2.BackgroundTransparency = 1 | |
207 | tecks2.TextScaled = true | |
208 | tecks2.BorderSizePixel = 0 | |
209 | tecks2.Text = "Sonic" | |
210 | - | tecks2.Text = "Sonic.exe" |
210 | + | |
211 | tecks2.TextSize = 30 | |
212 | tecks2.TextStrokeTransparency = 0 | |
213 | tecks2.TextColor3 = C3.N(0,0,0) | |
214 | tecks2.TextStrokeColor3 = C3.N(.0,0,7) | |
215 | - | tecks2.TextStrokeColor3 = C3.N(.7,0,0) |
215 | + | |
216 | tecks2.Parent = naeeym2 | |
217 | ||
218 | ||
219 | IN("Shirt",Char) | |
220 | IN("Pants",Char) | |
221 | ||
222 | Hum.WalkSpeed = WalkSpeed | |
223 | if(PlayerSize ~= 1)then | |
224 | for _,v in next, Char:GetDescendats() do | |
225 | if(v:IsA'BasePart')then | |
226 | v.Size = v.Size * PlayerSize | |
227 | end | |
228 | end | |
229 | end | |
230 | ||
231 | ||
232 | ||
233 | ||
234 | pcall(function() | |
235 | Char.LeftWing:destroy() | |
236 | Char.ReaperShadowHead:destroy() | |
237 | end) | |
238 | ||
239 | ||
240 | local Music = Sound(Torso,MusicID,1,3,true,false,true) | |
241 | Music.Name = 'Music' | |
242 | ||
243 | --// Stop animations \\-- | |
244 | for _,v in next, Hum:GetPlayingAnimationTracks() do | |
245 | v:Stop(); | |
246 | end | |
247 | ||
248 | pcall(game.Destroy,Char:FindFirstChild'Animate') | |
249 | pcall(game.Destroy,Hum:FindFirstChild'Animator') | |
250 | ||
251 | --// Joints \\-- | |
252 | ||
253 | local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)}) | |
254 | local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)}) | |
255 | local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)}) | |
256 | local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)}) | |
257 | local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)}) | |
258 | local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso}) | |
259 | local HW = NewInstance('Motor',Char,{Part0=RArm,Part1=Knife,C0=CF.N(0,-1,-1)*CF.A(M.R(-90),0,0)}) | |
260 | local HW2 = NewInstance('Motor',Char,{Part0=Head,Part1=Hair,C0=CF.N(0,.25,0)}) | |
261 | ||
262 | local LSC0 = LS.C0 | |
263 | local RSC0 = RS.C0 | |
264 | local NKC0 = NK.C0 | |
265 | local LHC0 = LH.C0 | |
266 | local RHC0 = RH.C0 | |
267 | local RJC0 = RJ.C0 | |
268 | ||
269 | --// Artificial HB \\-- | |
270 | ||
271 | local ArtificialHB = IN("BindableEvent", script) | |
272 | ArtificialHB.Name = "Heartbeat" | |
273 | ||
274 | script:WaitForChild("Heartbeat") | |
275 | ||
276 | local tf = 0 | |
277 | local allowframeloss = false | |
278 | local tossremainder = false | |
279 | local lastframe = tick() | |
280 | local frame = 1/Frame_Speed | |
281 | ArtificialHB:Fire() | |
282 | ||
283 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
284 | tf = tf + s | |
285 | if tf >= frame then | |
286 | if allowframeloss then | |
287 | script.Heartbeat:Fire() | |
288 | lastframe = tick() | |
289 | else | |
290 | for i = 1, math.floor(tf / frame) do | |
291 | ArtificialHB:Fire() | |
292 | end | |
293 | lastframe = tick() | |
294 | end | |
295 | if tossremainder then | |
296 | tf = 0 | |
297 | else | |
298 | tf = tf - frame * math.floor(tf / frame) | |
299 | end | |
300 | end | |
301 | end) | |
302 | ||
303 | function swait(num) | |
304 | if num == 0 or num == nil then | |
305 | ArtificialHB.Event:wait() | |
306 | else | |
307 | for i = 0, num do | |
308 | ArtificialHB.Event:wait() | |
309 | end | |
310 | end | |
311 | end | |
312 | ||
313 | ||
314 | --// Effect Function(s) \\-- | |
315 | ||
316 | function Bezier(startpos, pos2, pos3, endpos, t) | |
317 | local A = startpos:lerp(pos2, t) | |
318 | local B = pos2:lerp(pos3, t) | |
319 | local C = pos3:lerp(endpos, t) | |
320 | local lerp1 = A:lerp(B, t) | |
321 | local lerp2 = B:lerp(C, t) | |
322 | local cubic = lerp1:lerp(lerp2, t) | |
323 | return cubic | |
324 | end | |
325 | ||
326 | function Tween(obj,props,time,easing,direction,repeats,backwards) | |
327 | local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false) | |
328 | local tween = S.TweenService:Create(obj, info, props) | |
329 | ||
330 | tween:Play() | |
331 | end | |
332 | ||
333 | local FXTable = {} | |
334 | ||
335 | coroutine.resume(coroutine.create(function() | |
336 | while true do | |
337 | for i = 1, #FXTable do | |
338 | local data = FXTable[i] | |
339 | if(data)then | |
340 | local Frame = data.Frame | |
341 | local FX = data.Effect or 'ResizeAndFade' | |
342 | local Parent = data.Parent or Effects | |
343 | local Color = data.Color or C3.N(0,0,0) | |
344 | local Size = data.Size or V3.N(1,1,1) | |
345 | local MoveDir = data.MoveDirection or nil | |
346 | local MeshData = data.Mesh or nil | |
347 | local SndData = data.Sound or nil | |
348 | local Frames = data.Frames or 45 | |
349 | local CFra = data.CFrame or Torso.CFrame | |
350 | local Settings = data.FXSettings or {} | |
351 | local Prt,Msh,Snd = data.Part,data.Mesh,data.Sound | |
352 | local grow = data.Grow | |
353 | ||
354 | local MoveSpeed = nil; | |
355 | if(MoveDir)then | |
356 | MoveSpeed = (CFra.p - MoveDir).magnitude/Frames | |
357 | end | |
358 | if(FX ~= 'Arc')then | |
359 | Frame = Frame + 1 | |
360 | if(FX == "Fade")then | |
361 | Prt.Transparency = (Frame/Frames) | |
362 | elseif(FX == "Resize")then | |
363 | if(not Settings.EndSize)then | |
364 | Settings.EndSize = V3.N(0,0,0) | |
365 | end | |
366 | if(Settings.EndIsIncrement)then | |
367 | if(Msh)then | |
368 | Msh.Scale = Msh.Scale + Settings.EndSize | |
369 | else | |
370 | Prt.Size = Prt.Size + Settings.EndSize | |
371 | end | |
372 | else | |
373 | if(Msh)then | |
374 | Msh.Scale = Msh.Scale - grow/Frames | |
375 | else | |
376 | Prt.Size = Prt.Size - grow/Frames | |
377 | end | |
378 | end | |
379 | elseif(FX == "ResizeAndFade")then | |
380 | if(not Settings.EndSize)then | |
381 | Settings.EndSize = V3.N(0,0,0) | |
382 | end | |
383 | if(Settings.EndIsIncrement)then | |
384 | if(Msh)then | |
385 | Msh.Scale = Msh.Scale + Settings.EndSize | |
386 | else | |
387 | Prt.Size = Prt.Size + Settings.EndSize | |
388 | end | |
389 | else | |
390 | if(Msh)then | |
391 | Msh.Scale = Msh.Scale - grow/Frames | |
392 | else | |
393 | Prt.Size = Prt.Size - grow/Frames | |
394 | end | |
395 | end | |
396 | Prt.Transparency = (Frame/Frames) | |
397 | end | |
398 | if(Settings.RandomizeCFrame)then | |
399 | Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360)) | |
400 | end | |
401 | if(MoveDir and MoveSpeed)then | |
402 | local Orientation = Prt.Orientation | |
403 | Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed) | |
404 | Prt.Orientation = Orientation | |
405 | end | |
406 | if(Prt.Transparency >= 1 or Frame >= Frames)then | |
407 | Prt:destroy() | |
408 | table.remove(FXTable,i) | |
409 | else | |
410 | data.Frame = Frame | |
411 | end | |
412 | else | |
413 | local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End | |
414 | if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end | |
415 | if(start and endP)then | |
416 | local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
417 | local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
418 | Frame = Frame + (Settings.Speed or 0.01) | |
419 | if(Settings.Home)then | |
420 | endP = Settings.Home.CFrame | |
421 | end | |
422 | Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame) | |
423 | if(Prt.Transparency >= 1 or Frame >= Frames)then | |
424 | if(Settings.RemoveOnGoal)then | |
425 | Prt:destroy() | |
426 | end | |
427 | end | |
428 | else | |
429 | Prt:destroy() | |
430 | end | |
431 | end | |
432 | end | |
433 | end | |
434 | swait() | |
435 | end | |
436 | end)) | |
437 | ||
438 | function Effect(data) | |
439 | local FX = data.Effect or 'ResizeAndFade' | |
440 | local Parent = data.Parent or Effects | |
441 | local Color = data.Color or C3.N(0,0,0) | |
442 | local Size = data.Size or V3.N(1,1,1) | |
443 | local MoveDir = data.MoveDirection or nil | |
444 | local MeshData = data.Mesh or nil | |
445 | local SndData = data.Sound or nil | |
446 | local Frames = data.Frames or 45 | |
447 | local Manual = data.Manual or nil | |
448 | local Material = data.Material or nil | |
449 | local CFra = data.CFrame or Torso.CFrame | |
450 | local Settings = data.FXSettings or {} | |
451 | local Shape = data.Shape or Enum.PartType.Block | |
452 | local Snd,Prt,Msh; | |
453 | coroutine.wrap(function() | |
454 | if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then | |
455 | Prt = Manual | |
456 | else | |
457 | Prt = Part(Parent,Color,Material,Size,CFra,true,false) | |
458 | Prt.Shape = Shape | |
459 | end | |
460 | if(typeof(MeshData) == 'table')then | |
461 | Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset) | |
462 | elseif(typeof(MeshData) == 'Instance')then | |
463 | Msh = MeshData:Clone() | |
464 | Msh.Parent = Prt | |
465 | elseif(Shape == Enum.PartType.Block)then | |
466 | Msh = Mesh(Prt,Enum.MeshType.Brick) | |
467 | end | |
468 | if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then | |
469 | Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true) | |
470 | end | |
471 | if(Snd)then | |
472 | repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0 | |
473 | Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch | |
474 | end | |
475 | Size = (Msh and Msh.Scale or Size) | |
476 | local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2) | |
477 | ||
478 | local MoveSpeed = nil; | |
479 | if(MoveDir)then | |
480 | MoveSpeed = (CFra.p - MoveDir).magnitude/Frames | |
481 | end | |
482 | if(FX ~= 'Arc')then | |
483 | for Frame = 1, Frames do | |
484 | if(FX == "Fade")then | |
485 | Prt.Transparency = (Frame/Frames) | |
486 | elseif(FX == "Resize")then | |
487 | if(not Settings.EndSize)then | |
488 | Settings.EndSize = V3.N(0,0,0) | |
489 | end | |
490 | if(Settings.EndIsIncrement)then | |
491 | if(Msh)then | |
492 | Msh.Scale = Msh.Scale + Settings.EndSize | |
493 | else | |
494 | Prt.Size = Prt.Size + Settings.EndSize | |
495 | end | |
496 | else | |
497 | if(Msh)then | |
498 | Msh.Scale = Msh.Scale - grow/Frames | |
499 | else | |
500 | Prt.Size = Prt.Size - grow/Frames | |
501 | end | |
502 | end | |
503 | elseif(FX == "ResizeAndFade")then | |
504 | if(not Settings.EndSize)then | |
505 | Settings.EndSize = V3.N(0,0,0) | |
506 | end | |
507 | if(Settings.EndIsIncrement)then | |
508 | if(Msh)then | |
509 | Msh.Scale = Msh.Scale + Settings.EndSize | |
510 | else | |
511 | Prt.Size = Prt.Size + Settings.EndSize | |
512 | end | |
513 | else | |
514 | if(Msh)then | |
515 | Msh.Scale = Msh.Scale - grow/Frames | |
516 | else | |
517 | Prt.Size = Prt.Size - grow/Frames | |
518 | end | |
519 | end | |
520 | Prt.Transparency = (Frame/Frames) | |
521 | end | |
522 | if(Settings.RandomizeCFrame)then | |
523 | Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360)) | |
524 | end | |
525 | if(MoveDir and MoveSpeed)then | |
526 | local Orientation = Prt.Orientation | |
527 | Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed) | |
528 | Prt.Orientation = Orientation | |
529 | end | |
530 | swait() | |
531 | end | |
532 | Prt:destroy() | |
533 | else | |
534 | local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End | |
535 | if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end | |
536 | if(start and endP)then | |
537 | local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
538 | local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
539 | for Frame = 0, 1, (Settings.Speed or 0.01) do | |
540 | if(Settings.Home)then | |
541 | endP = Settings.Home.CFrame | |
542 | end | |
543 | Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame) | |
544 | end | |
545 | if(Settings.RemoveOnGoal)then | |
546 | Prt:destroy() | |
547 | end | |
548 | else | |
549 | Prt:destroy() | |
550 | assert(start,"You need a start position!") | |
551 | assert(endP,"You need a start position!") | |
552 | end | |
553 | end | |
554 | end)() | |
555 | return Prt,Msh,Snd | |
556 | end | |
557 | ||
558 | ||
559 | ||
560 | function SoulSteal(whom,human) | |
561 | local torso = (whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart' or whom:FindFirstChild'Torso') | |
562 | local succ, health, alive = pcall(function() return whom:FindFirstChildOfClass'Humanoid'.Health, whom:FindFirstChildOfClass'Humanoid'.Health > 0 end) | |
563 | if(torso and torso:IsA'BasePart' and alive == true)then | |
564 | whom:FindFirstChildOfClass'Humanoid'.Health = 0 | |
565 | whom:BreakJoints() | |
566 | local Model = IN("Model",Effects) | |
567 | warn('Soul stolen from '..whom.Name) | |
568 | Model.Name = whom.Name.."'s Soul Free" | |
569 | - | Model.Name = whom.Name.."'s Soul Roblox" |
569 | + | |
570 | Soul.CanCollide=false | |
571 | Mesh(Soul,Enum.MeshType.Sphere) | |
572 | Soul.Name = 'Head' | |
573 | if(whom.Name == 'CKbackup')then | |
574 | Soul.Color = C3.N(1,1,1) | |
575 | local DripEmitter = NewInstance("ParticleEmitter",Soul,{EmissionDirection='Bottom',Color=CS(Soul.Color),LightEmission=.5,LightInfluence=0,Size=NumberSequence.new(0.3),Texture="rbxassetid://243132757",Transparency=NumberSequence.new(0,1),LockedToPart=false,Lifetime=NumberRange.new(1),Rate=150,Speed=NumberRange.new(5)}) | |
576 | end | |
577 | local Hoom = NewInstance("Humanoid",Model,{MaxHealth=(health <= 10000 and health/2 or 10000),Health=(health <= 10000 and health/2 or 10000)}) | |
578 | local AT0 = NewInstance("Attachment",Soul,{Position=V3.N(0,.5,0)}) | |
579 | local AT1 = NewInstance("Attachment",Soul,{Position=V3.N(0,-.5,0)}) | |
580 | local Trail = NewInstance("Trail",Soul,{Attachment0=AT0,Attachment1=AT1,Transparency=NumberSequence.new(0),FaceCamera = true,Texture="rbxassetid://945758042",LightEmission=.3,Color=CS(Soul.Color),Lifetime=.5,MinLength=0}) | |
581 | NewInstance("PointLight",Soul,{Color=Soul.Color,Range=10,Brightness=(human and 3 or .5)}) | |
582 | ||
583 | local turdso = Soul:Clone() | |
584 | turdso.Name = "Torso" | |
585 | turdso.CanCollide = false | |
586 | turdso.Anchored = true | |
587 | turdso.CFrame = Soul.CFrame | |
588 | turdso.Parent = Model | |
589 | turdso.Size = V3.N() | |
590 | turdso.Transparency=1 | |
591 | local Distance = math.huge | |
592 | repeat | |
593 | Soul.CFrame = CF.N(Soul.Position,Torso.Position)*CF.N(0,0,-1) | |
594 | turdso.CFrame = Soul.CFrame | |
595 | Distance = (Soul.CFrame.p-Torso.CFrame.p).magnitude | |
596 | swait() | |
597 | until Hoom.Health <= 0 or not Soul.Parent or Distance <= 1.2 | |
598 | if(Soul.Parent and Hoom.Health > 0)then | |
599 | Model:destroy() | |
600 | Effect{ | |
601 | Effect="ResizeAndFade", | |
602 | Mesh={Enum.MeshType.Sphere}, | |
603 | Color = Soul.Color, | |
604 | CFrame=Torso.CFrame, | |
605 | Size=V3.N(3,3,3), | |
606 | Material=Enum.Material.Neon, | |
607 | Sound={SoundId=444667859,Pitch=1,Volume=2.5}, | |
608 | FXSettings={ | |
609 | EndSize=V3.N(6,6,6), | |
610 | } | |
611 | } | |
612 | Souls = Souls + (human and 20 or 20) | |
613 | - | Souls = Souls + (human and 20 or .5) |
613 | + | |
614 | MaxHealth = MaxHealth + Hoom.Health | |
615 | Hum.Health = Hum.Health + Hoom.Health | |
616 | for i = 10, 5 do | |
617 | Effect{ | |
618 | Effect="Fade", | |
619 | Color = Soul.Color, | |
620 | MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p | |
621 | } | |
622 | end | |
623 | else | |
624 | ||
625 | warn("Soul destroyed!") | |
626 | for i = 1, 5 do | |
627 | Effect{ | |
628 | Effect="Fade", | |
629 | Color = Soul.Color, | |
630 | CFrame=Soul.CFrame, | |
631 | MoveDirection = (Soul.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p | |
632 | } | |
633 | end | |
634 | Effect{ | |
635 | Effect="ResizeAndFade", | |
636 | Mesh={Enum.MeshType.Sphere}, | |
637 | Sound={SoundId=444667859,Pitch=1,Volume=5}, | |
638 | Color = Soul.Color, | |
639 | CFrame=Soul.CFrame, | |
640 | Size=V3.N(3,3,3), | |
641 | Material=Enum.Material.Neon, | |
642 | FXSettings={ | |
643 | EndSize=V3.N(6,6,6), | |
644 | } | |
645 | } | |
646 | Model:destroy() | |
647 | end | |
648 | end | |
649 | end | |
650 | ||
651 | --// Other Functions \\ -- | |
652 | ||
653 | function getRegion(point,range,ignore) | |
654 | return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100) | |
655 | end | |
656 | ||
657 | function clerp(startCF,endCF,alpha) | |
658 | return startCF:lerp(endCF, alpha) | |
659 | end | |
660 | ||
661 | function GetTorso(char) | |
662 | return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart' | |
663 | end | |
664 | ||
665 | function ShowDamage(Pos, Text, Time, Color) | |
666 | coroutine.wrap(function() | |
667 | local Rate = (1 / Frame_Speed) | |
668 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
669 | local Text = (Text or "") | |
670 | local Time = (Time or 2) | |
671 | local Color = (Color or Color3.new(1, 0, 1)) | |
672 | local EffectPart = NewInstance("Part",Effects,{ | |
673 | Material=Enum.Material.SmoothPlastic, | |
674 | Reflectance = 0, | |
675 | Transparency = 1, | |
676 | BrickColor = BrickColor.new(Color), | |
677 | Name = "Effect", | |
678 | Size = Vector3.new(0,0,0), | |
679 | Anchored = true, | |
680 | CFrame = CF.N(Pos) | |
681 | }) | |
682 | local BillboardGui = NewInstance("BillboardGui",EffectPart,{ | |
683 | Size = UDim2.new(1.25, 0, 1.25, 0), | |
684 | Adornee = EffectPart, | |
685 | }) | |
686 | local TextLabel = NewInstance("TextLabel",BillboardGui,{ | |
687 | BackgroundTransparency = 1, | |
688 | Size = UDim2.new(1, 0, 1, 0), | |
689 | Text = Text, | |
690 | Font = "Arcade", | |
691 | TextColor3 = Color, | |
692 | TextStrokeColor3 = Color3.new(0,0,0), | |
693 | TextStrokeTransparency=0, | |
694 | TextScaled = true, | |
695 | }) | |
696 | S.Debris:AddItem(EffectPart, (Time)) | |
697 | EffectPart.Parent = workspace | |
698 | delay(0, function() | |
699 | Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out) | |
700 | local Frames = (Time / Rate) | |
701 | for Frame = 1, Frames do | |
702 | swait() | |
703 | local Percent = (Frame / Frames) | |
704 | TextLabel.TextTransparency = Percent | |
705 | TextLabel.TextStrokeTransparency = Percent | |
706 | end | |
707 | if EffectPart and EffectPart.Parent then | |
708 | EffectPart:Destroy() | |
709 | end | |
710 | end) end)() | |
711 | end | |
712 | ||
713 | function Kill(whom) | |
714 | if(whom.Name ~= 'Nebula_Zorua')then | |
715 | local isPlr = Plrs:GetPlayerFromCharacter(whom) ~= nil | |
716 | coroutine.wrap(SoulSteal)(whom,isPlr) | |
717 | for _,v in next, whom:children() do | |
718 | if(v:IsA'BasePart')then | |
719 | v.Parent = Effects | |
720 | v:ClearAllChildren() | |
721 | v.Anchored = true | |
722 | v.CanCollide = false | |
723 | v.Transparency = 1 | |
724 | local dust = NewInstance("ParticleEmitter",v,{ | |
725 | Color = ColorSequence.new(C3.N(1,1,1)), | |
726 | LightEmission=0, | |
727 | LightInfluence=1, | |
728 | Size=NumberSequence.new{NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(1,0,0)}, | |
729 | Texture="rbxassetid://284205403", | |
730 | Transparency=NumberSequence.new{NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)}, | |
731 | Lifetime = NumberRange.new(1), | |
732 | Rate=150, | |
733 | Acceleration = V3.N(0,10,0), | |
734 | Speed = NumberRange.new(5), | |
735 | Enabled = true | |
736 | }) | |
737 | delay(1, function() | |
738 | dust.Enabled = false | |
739 | S.Debris:AddItem(v,2) | |
740 | end) | |
741 | end | |
742 | end | |
743 | else | |
744 | warn"nope. nawt happenin'" | |
745 | end | |
746 | end | |
747 | ||
748 | function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult) | |
749 | if(who)then | |
750 | local hum = who:FindFirstChildOfClass'Humanoid' | |
751 | local Damage = M.RNG(minDam,maxDam) | |
752 | local canHit = true | |
753 | if(hum)then | |
754 | for _, p in pairs(Hit) do | |
755 | if p[1] == hum then | |
756 | if(time() - p[2] < 0.4) then | |
757 | canHit = false | |
758 | else | |
759 | Hit[_] = nil | |
760 | end | |
761 | end | |
762 | end | |
763 | if(canHit)then | |
764 | table.insert(Hit,{hum,time()}) | |
765 | if(GetTorso(who))then | |
766 | Sound(GetTorso(who),406913243,1,10,false,true,true) | |
767 | end | |
768 | if(hum.Health >= math.huge)then | |
769 | Kill(who) | |
770 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
771 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "INSTANT", 3, DamageColor.Color) | |
772 | end | |
773 | else | |
774 | local player = S.Players:GetPlayerFromCharacter(who) | |
775 | if(Type == "Fire")then | |
776 | --idk.. | |
777 | else | |
778 | local c = Instance.new("ObjectValue",hum) | |
779 | c.Name = "creator" | |
780 | c.Value = Plr | |
781 | game:service'Debris':AddItem(c,0.35) | |
782 | local Crit = false | |
783 | if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then | |
784 | Crit = true | |
785 | Damage = Damage*(critMult or 2) | |
786 | end | |
787 | Damage = Damage*((Souls/5)+1) | |
788 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
789 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), (Crit and "[CRIT] " or "").. math.floor(Damage), 3, (Crit and BrickColor.new'New Yeller'.Color or DamageColor.Color)) | |
790 | end | |
791 | ||
792 | if(hum.Health - Damage <= 0)then | |
793 | Kill(who) | |
794 | else | |
795 | hum.Health = hum.Health - Damage | |
796 | if(Type == 'Knockback' and GetTorso(who))then | |
797 | local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit | |
798 | local body = NewInstance('BodyVelocity',GetTorso(who),{ | |
799 | P = 500, | |
800 | maxForce = V3.N(math.huge,0,math.huge), | |
801 | velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05 | |
802 | }) | |
803 | game:service'Debris':AddItem(body,.5) | |
804 | elseif(Type == "Electric")then | |
805 | if(M.RNG(1,100) >= critChance)then | |
806 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
807 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[PARALYZED]", 3, BrickColor.new"New Yeller".Color) | |
808 | end | |
809 | local asd = hum.WalkSpeed/2 | |
810 | hum.WalkSpeed = asd | |
811 | local paralyzed = true | |
812 | coroutine.wrap(function() | |
813 | while paralyzed do | |
814 | swait(25) | |
815 | if(M.RNG(1,25) == 1)then | |
816 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
817 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[STATIC]", 3, BrickColor.new"New Yeller".Color) | |
818 | end | |
819 | hum.PlatformStand = true | |
820 | end | |
821 | end | |
822 | end)() | |
823 | delay(4, function() | |
824 | paralyzed = false | |
825 | hum.WalkSpeed = hum.WalkSpeed + asd | |
826 | end) | |
827 | end | |
828 | ||
829 | elseif(Type == 'Knockdown' and GetTorso(who))then | |
830 | local rek = GetTorso(who) | |
831 | hum.PlatformStand = true | |
832 | delay(1,function() | |
833 | hum.PlatformStand = false | |
834 | end) | |
835 | local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit | |
836 | local bodvol = NewInstance("BodyVelocity",rek,{ | |
837 | velocity = angle * Knock, | |
838 | P = 5000, | |
839 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
840 | }) | |
841 | local rl = NewInstance("BodyAngularVelocity",rek,{ | |
842 | P = 3000, | |
843 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
844 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
845 | }) | |
846 | game:GetService("Debris"):AddItem(bodvol, .5) | |
847 | game:GetService("Debris"):AddItem(rl, .5) | |
848 | end | |
849 | end | |
850 | end | |
851 | end | |
852 | end | |
853 | end | |
854 | end | |
855 | end | |
856 | ||
857 | ||
858 | function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult) | |
859 | for _,v in next, getRegion(where,range,{Char}) do | |
860 | if(v.Name ~= 'Nebula_Zorua')then | |
861 | if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then | |
862 | DealDamage(v.Parent,minDam,maxDam,Knock,Type,critChance,critMult) | |
863 | end | |
864 | end | |
865 | end | |
866 | end | |
867 | ||
868 | function AOEKill(where,range) | |
869 | for _,v in next, getRegion(where,range,{Char,Effects}) do | |
870 | local succ,alive = pcall(function() return v.Parent:FindFirstChildOfClass'Humanoid'.Health > 0 end) | |
871 | if(v.Name ~= 'Nebula_Zorua')then | |
872 | if(v.Parent and alive == true)then | |
873 | coroutine.wrap(Kill)(v.Parent) | |
874 | end | |
875 | end | |
876 | end | |
877 | end | |
878 | ||
879 | function AOEHeal(where,range,amount) | |
880 | local healed = {} | |
881 | for _,v in next, getRegion(where,range,{Char}) do | |
882 | local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil) | |
883 | if(hum and not healed[hum])then | |
884 | hum.Health = hum.Health + amount | |
885 | if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then | |
886 | ShowDamage((v.Parent.Head.CFrame * CF.N(0, 0, (v.Parent.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "+"..amount, 1.5, BrickColor.new'Lime green'.Color) | |
887 | end | |
888 | end | |
889 | end | |
890 | end | |
891 | ||
892 | ||
893 | --// Attack Functions \\-- | |
894 | ||
895 | ||
896 | function Slash() | |
897 | Attack = true | |
898 | NeutralAnims = false | |
899 | local sound = Sound(Knife,4,1,5,false,true,false) | |
900 | for i = 0, 2, 0.1 do | |
901 | swait() | |
902 | local Alpha = .2 | |
903 | RJ.C0 = clerp(RJ.C0,CFrame.new(0.0343287587, 0.00629056804, 0.0572580174, 0.943793893, 0.00207689893, 0.330528289, 1.0000764e-06, 0.99998033, -0.00628630351, -0.330534875, 0.00593330665, 0.943775296),Alpha) | |
904 | LH.C0 = clerp(LH.C0,CFrame.new(-0.496478021, -0.990818381, 0.021652732, 0.999878168, 0, 0.0156089365, -9.80779296e-05, 0.99998033, 0.00628268253, -0.0156086385, -0.00628344761, 0.999858379),Alpha) | |
905 | RH.C0 = clerp(RH.C0,CFrame.new(0.498511612, -0.990985274, 0.0154910646, 0.999878168, 0, 0.0156089365, -9.80779296e-05, 0.99998033, 0.00628268253, -0.0156086385, -0.00628344761, 0.999858379),Alpha) | |
906 | LS.C0 = clerp(LS.C0,CFrame.new(-1.32692134, 0.474511296, -0.0055731535, 0.934981823, 0.354351997, 0.0156129003, -0.354479939, 0.93504262, 0.00628374517, -0.0123721063, -0.0114096552, 0.999858379),Alpha) | |
907 | RS.C0 = clerp(RS.C0,CFrame.new(1.12629449, 0.369358033, -0.486052871, 0.490151912, 0.65154773, 0.57899636, 0.721657813, 0.0691910982, -0.688783586, -0.488836735, 0.755445719, -0.436280251),Alpha) | |
908 | NK.C0 = clerp(NK.C0,CFrame.new(-0.0118216109, 1.49854016, -0.0795068145, 0.943793833, 0.0190048125, -0.329988182, 0.00207654224, 0.997985244, 0.0634154305, 0.330528468, -0.0605363287, 0.94185257),Alpha) | |
909 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
910 | end | |
911 | KTrail.Enabled = true | |
912 | sound:Play() | |
913 | for i = 0, 2.5, 0.1 do | |
914 | swait() | |
915 | AOEDamage(Knife.CFrame.p,1,15,30,0,"Normal",0,1) | |
916 | local Alpha = .25 | |
917 | RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0352100767, 0.00629066909, -0.0097481478, 0.817972422, -0.00361463916, -0.575246274, -1.74103582e-06, 0.99998033, -0.00628598873, 0.575257719, 0.00514276745, 0.817956269),Alpha) | |
918 | LH.C0 = clerp(LH.C0,CFrame.new(-0.496478021, -0.990818381, 0.0216572341, 0.999878287, 0, 0.015610218, -9.80866607e-05, 0.99998033, 0.00628274865, -0.0156098902, -0.00628351374, 0.999858499),Alpha) | |
919 | RH.C0 = clerp(RH.C0,CFrame.new(0.498511702, -0.990985274, 0.0154905058, 0.999878287, 0, 0.015610218, -9.80866607e-05, 0.99998033, 0.00628274865, -0.0156098902, -0.00628351374, 0.999858499),Alpha) | |
920 | LS.C0 = clerp(LS.C0,CFrame.new(-1.32694602, 0.474510223, -0.00555660389, 0.934981823, 0.354351729, 0.0156157613, -0.354479671, 0.935042739, 0.00628153514, -0.012375474, -0.0114085823, 0.999858379),Alpha) | |
921 | RS.C0 = clerp(RS.C0,CFrame.new(1.23906493, 0.406229913, 0.00231830776, 0.49015066, -0.849889755, 0.193494052, 0.721655607, 0.520183682, 0.456752002, -0.488841236, -0.0842411816, 0.868295968),Alpha) | |
922 | NK.C0 = clerp(NK.C0,CFrame.new(0.0315471888, 1.49887729, -0.0257819965, 0.817972481, -0.0330747738, 0.574305832, -0.00361499586, 0.998030663, 0.0626262054, -0.575246155, -0.0533026271, 0.81624186),Alpha) | |
923 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
924 | end | |
925 | KTrail.Enabled = false | |
926 | Attack = false | |
927 | NeutralAnims = true | |
928 | end | |
929 | ||
930 | Mouse.Button1Down:connect(function() | |
931 | if(Attack)then return end | |
932 | Slash() | |
933 | end) | |
934 | ||
935 | Mouse.KeyDown:connect(function(k) | |
936 | if(Attack)then return end | |
937 | if(k == 'z')then AOEKill(Root.CFrame.p,25) end -- TODO: Animation and effects | |
938 | if(k == 'q')then WalkSpeed = (WalkSpeed == 20 and 250 or 20) end | |
939 | - | if(k == 'q')then WalkSpeed = (WalkSpeed == 20 and 150 or 20) end |
939 | + | |
940 | ||
941 | ||
942 | function Refuse() | |
943 | Attack = true | |
944 | warn("I NOT NEED GIVE UP I NEED ALIVE.") | |
945 | - | warn("B u t i t r e f u s e d.") |
945 | + | |
946 | MaxHealth = "inf" | |
947 | Hum.MaxHealth = "inf" | |
948 | Hum.Health = "inf" | |
949 | Char.Parent = nil | |
950 | Hum:destroy() | |
951 | if(not _G.RefusedAnimation)then | |
952 | _G.RefusedAnimation = true | |
953 | ||
954 | ||
955 | local Soul; | |
956 | function Soul(where,decalId) | |
957 | local destroy = false | |
958 | local soul = NewInstance("Part",workspace) | |
959 | soul.Name = "Soul" | |
960 | soul.Transparency=1 | |
961 | soul.Size = V3.N(2,2,.05) | |
962 | soul.Anchored=true | |
963 | soul.CanCollide=false | |
964 | soul.CFrame = where | |
965 | local heartF = NewInstance("Decal",soul,{Face=Enum.NormalId.Front,Texture="rbxassetid://"..decalId}) | |
966 | local heartB = NewInstance("Decal",soul,{Face=Enum.NormalId.Back,Texture="rbxassetid://"..decalId}) | |
967 | return soul,heartF,heartB | |
968 | end | |
969 | local owo = Root.CFrame | |
970 | local s,f,b = Soul(owo,1569347904) | |
971 | swait(60) | |
972 | local snd = Sound(s,862552636,1,5,false,false,false) | |
973 | snd:Play() | |
974 | f.Texture = "rbxassetid://1569348344" | |
975 | b.Texture = "rbxassetid://1569348344" | |
976 | swait(15) | |
977 | snd:Stop() | |
978 | swait(60) | |
979 | print'lol' | |
980 | for i = 0, 6, .1 do | |
981 | swait() | |
982 | s.CFrame = owo * CF.N(M.RNG(-50,50)/100,M.RNG(-50,50)/100,M.RNG(-50,50)/100) | |
983 | end | |
984 | local snd = Sound(s,862552636,1,5,false,false,false) | |
985 | snd:Play() | |
986 | s.CFrame = owo | |
987 | f.Texture = "rbxassetid://1569347904" | |
988 | b.Texture = "rbxassetid://1569347904" | |
989 | swait(15) | |
990 | snd:Stop() | |
991 | swait(60) | |
992 | ||
993 | s:destroy() | |
994 | end | |
995 | ||
996 | RJ.Parent = Char | |
997 | LS.Parent = Char | |
998 | RS.Parent = Char | |
999 | LH.Parent = Char | |
1000 | RH.Parent = Char | |
1001 | NK.Parent = Char | |
1002 | ||
1003 | LArm.Parent = Char | |
1004 | RArm.Parent = Char | |
1005 | LLeg.Parent = Char | |
1006 | LArm.Parent = Char | |
1007 | Root.Parent = Char | |
1008 | Torso.Parent = Char | |
1009 | Head.Parent = Char | |
1010 | ||
1011 | Knife.Parent = Char | |
1012 | Hair.Parent = Char | |
1013 | ||
1014 | HW.Parent = Char | |
1015 | HW2.Parent = Char | |
1016 | ||
1017 | ||
1018 | REye:destroy() | |
1019 | LEye:destroy() | |
1020 | ||
1021 | Hum = NewInstance("Humanoid",Char,{DisplayDistanceType='None'}) | |
1022 | ConnectHum() | |
1023 | MaxHealth = oMH | |
1024 | Hum.MaxHealth = MaxHealth | |
1025 | Hum.Health = MaxHealth | |
1026 | swait(5) | |
1027 | Char.Parent = workspace | |
1028 | ||
1029 | Attack = false | |
1030 | end | |
1031 | ||
1032 | function ConnectHum() | |
1033 | Hum.Died:connect(Refuse) | |
1034 | end | |
1035 | ConnectHum() | |
1036 | ||
1037 | ||
1038 | --// Wrap it all up \\-- | |
1039 | while true do | |
1040 | swait() | |
1041 | Sine = Sine + Change | |
1042 | if(not Music)then | |
1043 | Music = Sound(Torso,MusicID,1,3,true,false,true) | |
1044 | Music.Name = 'Music' | |
1045 | end | |
1046 | Music.Pitch = 1 | |
1047 | Music.Volume = 5 | |
1048 | Music.SoundId = "rbxassetid://"..MusicID | |
1049 | Music.Parent = Torso | |
1050 | Music:Resume() | |
1051 | local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * 4), Char) | |
1052 | local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1) | |
1053 | local State = (Hum.PlatformStand and 'Paralyzed' or Hum.Sit and 'Sit' or not hitfloor and Root.Velocity.y < -1 and "Fall" or not hitfloor and Root.Velocity.y > 1 and "Jump" or hitfloor and Walking and "Walk" or hitfloor and "Idle") | |
1054 | if(not Effects or not Effects.Parent)then | |
1055 | Effects = IN("Model",Char) | |
1056 | Effects.Name = "Effects" | |
1057 | end | |
1058 | Hum.WalkSpeed = WalkSpeed | |
1059 | if(State == 'Walk')then | |
1060 | if(Hum.WalkSpeed >= 24)then | |
1061 | local wsVal = 22 / (Hum.WalkSpeed/16) | |
1062 | local Alpha = math.min(.1 * (Hum.WalkSpeed/16),1) | |
1063 | Change = 2 | |
1064 | RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.2*M.C(Sine/wsVal),0+.4*M.C(Sine/wsVal))*CF.A(M.R(25+45*M.C(Sine/wsVal))+-M.S(Sine/wsVal),0,0),Alpha) | |
1065 | LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.2*M.C(Sine/wsVal),0-.4*M.C(Sine/wsVal))*CF.A(M.R(25-45*M.C(Sine/wsVal))+M.S(Sine/wsVal),0,0),Alpha) | |
1066 | else | |
1067 | Change = .9 | |
1068 | local wsVal = 8 / (Hum.WalkSpeed/8) | |
1069 | local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1) | |
1070 | LH.C1 = LH.C1:lerp(CF.N(0,1-.2*M.C(Sine/wsVal)/2,.4*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))-M.S(Sine/wsVal)/2.5,0,0)*CF.A(M.R(0-3*M.C(Sine/wsVal)),0,0),Alpha) | |
1071 | RH.C1 = RH.C1:lerp(CF.N(0,1+.2*M.C(Sine/wsVal)/2,-.4*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0)*CF.A(M.R(0+3*M.C(Sine/wsVal)),0,0),Alpha) | |
1072 | end | |
1073 | else | |
1074 | RH.C1 = RH.C1:lerp(CF.N(0,1,0),.1) | |
1075 | LH.C1 = LH.C1:lerp(CF.N(0,1,0),.1) | |
1076 | end | |
1077 | for _,v in next, Char:children() do | |
1078 | if(v:IsA'Accessory')then | |
1079 | v:destroy() | |
1080 | elseif(v:IsA'Shirt')then | |
1081 | v.ShirtTemplate = "rbxassetid://173754282" | |
1082 | elseif(v:IsA'Pants')then | |
1083 | v.PantsTemplate = "rbxassetid://208385443" | |
1084 | elseif(v:IsA'CharacterMesh')then | |
1085 | v:destroy() | |
1086 | elseif(v:FindFirstChildOfClass'ShirtGraphic')then | |
1087 | v:FindFirstChildOfClass'ShirtGraphic':destroy() | |
1088 | end | |
1089 | end | |
1090 | local face = Head:FindFirstChild'face' | |
1091 | if(not face)then | |
1092 | NewInstance("Decal",Head,{Name='face',Face=Enum.NormalId.Front,Texture="rbxassetid://120954647"}) | |
1093 | - | NewInstance("Decal",Head,{Name='face',Face=Enum.NormalId.Front,Texture="rbxassetid://1102142750"}) |
1093 | + | |
1094 | face.Texture = "rbxassetid://120954647" | |
1095 | - | face.Texture = "rbxassetid://1102142750" |
1095 | + | |
1096 | RArm.BrickColor = BrickColor.new'Pastel brown' | |
1097 | LArm.BrickColor = BrickColor.new'Pastel brown' | |
1098 | RLeg.BrickColor = BrickColor.new'Pastel brown' | |
1099 | LLeg.BrickColor = BrickColor.new'Pastel brown' | |
1100 | Torso.BrickColor = BrickColor.new'Pastel brown' | |
1101 | Head.BrickColor = BrickColor.new'Pastel brown' | |
1102 | Hum.Name = 'Sonic' | |
1103 | - | Hum.Name = 'Sonic.exe' |
1103 | + | |
1104 | Hum.MaxHealth = MaxHealth | |
1105 | end | |
1106 | Hum.DisplayDistanceType='None' | |
1107 | if(NeutralAnims)then | |
1108 | if(State == 'Idle')then | |
1109 | Change = 1 | |
1110 | local Alpha = .1 | |
1111 | RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0999571308, 0+.05*M.C(Sine/16), -0.237876296, 0.857335567, -0.00323621999, -0.514731407, 0, 0.99998033, -0.00628707698, 0.51474154, 0.00539013464, 0.85731858),Alpha) | |
1112 | LH.C0 = clerp(LH.C0,CFrame.new(-0.536091685, -0.991042495-.05*M.C(Sine/16), -0.0134909991, 0.849195242, 0, 0.528063774, -0.00331997755, 0.99998033, 0.00533895614, -0.528053343, -0.00628707698, 0.849178433),Alpha) | |
1113 | RH.C0 = clerp(RH.C0,CFrame.new(0.529067397, -0.991597891-.05*M.C(Sine/16), -0.0818087086, 0.849195242, 0, 0.528063774, -0.00331997755, 0.99998033, 0.00533895614, -0.528053343, -0.00628707698, 0.849178433),Alpha) | |
1114 | LS.C0 = clerp(LS.C0,CFrame.new(-1.32175505, 0.156236127+.15*M.C(Sine/16), 0.233877867, 0.877554953, -0.456876248, 0.145469457, 0.259513229, 0.707695842, 0.657129884, -0.403175086, -0.538916171, 0.739607573),Alpha) | |
1115 | RS.C0 = clerp(RS.C0,CFrame.new(1.2516855, 0.604915917+.15*M.C(Sine/16), -0.0189059302, 0.915104508, -0.287113011, -0.283108115, 0.301054537, 0.953587949, 0.00603589695, 0.268235415, -0.0907544345, 0.959069014),Alpha) | |
1116 | NK.C0 = clerp(NK.C0,CFrame.new(1.79447234e-05, 1.49895597, -0.0143749639, 0.769539058, -0.360377938, 0.527197778, 0.387706369, 0.919646919, 0.0627188534, -0.507438183, 0.156133309, 0.847424924),Alpha) | |
1117 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1118 | -- idle | |
1119 | elseif(State == 'Walk')then | |
1120 | if(Hum.WalkSpeed >= 24)then | |
1121 | local wsVal = 22 / (Hum.WalkSpeed/16) | |
1122 | local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1) | |
1123 | RJ.C0 = RJ.C0:lerp(CF.N(0,0-.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15),M.R(0-15*M.S(Sine/wsVal)/2),0),Alpha) | |
1124 | LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+45*M.S(Sine/wsVal)),0,M.R(-5+15*M.S(Sine/wsVal))),Alpha) | |
1125 | RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-45*M.S(Sine/wsVal)),0,M.R(5+15*M.S(Sine/wsVal))),Alpha) | |
1126 | NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(15),0,0),Alpha) | |
1127 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(15),0,0),Alpha) | |
1128 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.15*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(15),0,0),Alpha) | |
1129 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1130 | else | |
1131 | local wsVal = 8 / (Hum.WalkSpeed/8) | |
1132 | local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1) | |
1133 | RJ.C0 = RJ.C0:lerp(CF.N(0,0-.05*M.C(Sine/(wsVal/2)),0)*CF.A(0,M.R(0-5*M.S(Sine/wsVal)/2),0),Alpha) | |
1134 | LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-25*M.S(Sine/wsVal)),0,M.R(5-5*M.S(Sine/wsVal))),Alpha) | |
1135 | RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+25*M.S(Sine/wsVal)),0,M.R(-5-5*M.S(Sine/wsVal))),Alpha) | |
1136 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1137 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha) | |
1138 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha) | |
1139 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1140 | end | |
1141 | elseif(State == 'Jump' or State == 'Fall')then | |
1142 | if(Walking)then | |
1143 | local Alpha = .2 | |
1144 | RJ.C0 = clerp(RJ.C0,RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(65)),M.R(65)),0,0),Alpha) | |
1145 | LH.C0 = clerp(LH.C0,CFrame.new(-0.497912645, -1.0987643, -0.0683324337, 0.999878228, 0.00860835519, 0.0130246133, -0.00010142161, 0.837816596, -0.545952022, -0.015611981, 0.545884132, 0.837715328),Alpha) | |
1146 | RH.C0 = clerp(RH.C0,CFrame.new(0.499978393, -1.16382337, 0.109293163, 0.999878228, -0.0120433727, 0.00993486121, -0.00010142161, 0.631323814, 0.775519371, -0.015611981, -0.775425911, 0.631245613),Alpha) | |
1147 | LS.C0 = clerp(LS.C0,CFrame.new(-1.55211556, 0.576563478, -0.00269976072, 0.976067662, 0.216906726, 0.0156116467, -0.217024669, 0.976145923, 0.00628317893, -0.0138763804, -0.00952091813, 0.999858499),Alpha) | |
1148 | RS.C0 = clerp(RS.C0,CFrame.new(1.50182188, 0.636661649, 0.00632623257, 0.977592707, -0.209926367, 0.0156121543, 0.209851891, 0.977713108, 0.00628198683, -0.016582964, -0.00286500831, 0.999858439),Alpha) | |
1149 | NK.C0 = clerp(NK.C0,CFrame.new(1.14440072e-05, 1.49924362, -0.0143961608, 1.00000024, -5.82076609e-11, 0, 1.23691279e-10, 0.997964919, 0.0637660474, 0, -0.0637660623, 0.997965038),Alpha) | |
1150 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1151 | else | |
1152 | local Alpha = .2 | |
1153 | RJ.C0 = clerp(RJ.C0,RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(65)),M.R(65)),0,0),Alpha) | |
1154 | LH.C0 = clerp(LH.C0,CFrame.new(-0.504374504, -0.291219354, -0.487436086, 0.999878228, -0.00438931212, 0.0149825988, -0.00010142161, 0.957819223, 0.287371844, -0.015611981, -0.287338346, 0.957701981),Alpha) | |
1155 | RH.C0 = clerp(RH.C0,CFrame.new(0.453094482, -0.871358454, 0.0898642987, 0.985589385, -0.168456957, 0.0153662469, 0.162863791, 0.969548643, 0.182895929, -0.0457084104, -0.177757636, 0.983012319),Alpha) | |
1156 | LS.C0 = clerp(LS.C0,CFrame.new(-1.55211556, 0.576563478, -0.00269976072, 0.976067662, 0.216906726, 0.0156116467, -0.217024669, 0.976145923, 0.00628317893, -0.0138763804, -0.00952091813, 0.999858499),Alpha) | |
1157 | RS.C0 = clerp(RS.C0,CFrame.new(1.50182188, 0.636661649, 0.00632623257, 0.977592707, -0.209926367, 0.0156121543, 0.209851891, 0.977713108, 0.00628198683, -0.016582964, -0.00286500831, 0.999858439),Alpha) | |
1158 | NK.C0 = clerp(NK.C0,CFrame.new(1.14440072e-05, 1.49924362, -0.0143961608, 1.00000024, -5.82076609e-11, 0, 1.23691279e-10, 0.997964919, 0.0637660474, 0, -0.0637660623, 0.997965038),Alpha) | |
1159 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1160 | end | |
1161 | elseif(State == 'Paralyzed')then | |
1162 | -- paralyzed | |
1163 | elseif(State == 'Sit')then | |
1164 | -- sit | |
1165 | end | |
1166 | end | |
1167 | end |