SHOW:
|
|
- or go back to the newest paste.
1 | - | -- Created by Nebula_Zorua -- |
1 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
2 | - | -- Your DeTERMINATION -- |
2 | + | local Player,game,owner = owner,game |
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 | + | local RealPlayer = Player |
4 | - | -- Discord: Nebula the Zorua#6969 |
4 | + | do |
5 | - | -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA |
5 | + | print("FE Compatibility code by Mokiros") |
6 | local rp = RealPlayer | |
7 | script.Parent = rp.Character | |
8 | ||
9 | --RemoteEvent for communicating | |
10 | local Event = Instance.new("RemoteEvent") | |
11 | Event.Name = "UserInput_Event" | |
12 | ||
13 | --Fake event to make stuff like Mouse.KeyDown work | |
14 | local function fakeEvent() | |
15 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} | |
16 | t.connect = t.Connect | |
17 | return t | |
18 | end | |
19 | ||
20 | --Creating fake input objects with fake variables | |
21 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
22 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
23 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
24 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
25 | end} | |
26 | --Merged 2 functions into one by checking amount of arguments | |
27 | CAS.UnbindAction = CAS.BindAction | |
28 | ||
29 | --This function will trigger the events that have been :Connect()'ed | |
30 | local function te(self,ev,...) | |
31 | local t = m[ev] | |
32 | if t and t._fakeEvent then | |
33 | for _,f in pairs(t.Functions) do | |
34 | f(...) | |
35 | end | |
36 | end | |
37 | end | |
38 | m.TrigEvent = te | |
39 | UIS.TrigEvent = te | |
40 | ||
41 | Event.OnServerEvent:Connect(function(plr,io) | |
42 | if plr~=rp then return end | |
43 | m.Target = io.Target | |
44 | m.Hit = io.Hit | |
45 | if not io.isMouse then | |
46 | local b = io.UserInputState == Enum.UserInputState.Begin | |
47 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
48 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
49 | end | |
50 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
51 | return m:TrigEvent(b and "Button2Down" or "Button2Up") | |
52 | end | |
53 | for _,t in pairs(CAS.Actions) do | |
54 | for _,k in pairs(t.Keys) do | |
55 | if k==io.KeyCode then | |
56 | t.Function(t.Name,io.UserInputState,io) | |
57 | end | |
58 | end | |
59 | end | |
60 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
61 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
62 | end | |
63 | end) | |
64 | Event.Parent = NLS([==[ | |
65 | local Player = game:GetService("Players").LocalPlayer | |
66 | local Event = script:WaitForChild("UserInput_Event") | |
67 | local Mouse = Player:GetMouse() | |
68 | local UIS = game:GetService("UserInputService") | |
69 | local input = function(io,a) | |
70 | if a then return end | |
71 | --Since InputObject is a client-side instance, we create and pass table instead | |
72 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
73 | end | |
74 | UIS.InputBegan:Connect(input) | |
75 | UIS.InputEnded:Connect(input) | |
76 | local h,t | |
77 | --Give the server mouse data 30 times every second, but only if the values changed | |
78 | --If player is not moving their mouse, client won't fire events | |
79 | while wait(1/30) do | |
80 | if h~=Mouse.Hit or t~=Mouse.Target then | |
81 | h,t=Mouse.Hit,Mouse.Target | |
82 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
83 | end | |
84 | end]==],Player.Character) | |
85 | ||
86 | ----Sandboxed game object that allows the usage of client-side methods and services | |
87 | --Real game object | |
88 | local _rg = game | |
89 | ||
90 | --Metatable for fake service | |
91 | local fsmt = { | |
92 | __index = function(self,k) | |
93 | local s = rawget(self,"_RealService") | |
94 | if s then | |
95 | return typeof(s[k])=="function" | |
96 | and function(_,...)return s[k](s,...)end or s[k] | |
97 | end | |
98 | end, | |
99 | __newindex = function(self,k,v) | |
100 | local s = rawget(self,"_RealService") | |
101 | if s then s[k]=v end | |
102 | end | |
103 | } | |
104 | local function FakeService(t,RealService) | |
105 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
106 | return setmetatable(t,fsmt) | |
107 | end | |
108 | ||
109 | --Fake game object | |
110 | local g = { | |
111 | GetService = function(self,s) | |
112 | return rawget(self,s) or _rg:GetService(s) | |
113 | end, | |
114 | Players = FakeService({ | |
115 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
116 | },"Players"), | |
117 | UserInputService = FakeService(UIS,"UserInputService"), | |
118 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
119 | RunService = FakeService({ | |
120 | _btrs = {}, | |
121 | RenderStepped = _rg:GetService("RunService").Heartbeat, | |
122 | BindToRenderStep = function(self,name,_,fun) | |
123 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
124 | end, | |
125 | UnbindFromRenderStep = function(self,name) | |
126 | self._btrs[name]:Disconnect() | |
127 | end, | |
128 | },"RunService") | |
129 | } | |
130 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
131 | g.service = g.GetService | |
132 | FakeService(g,game) | |
133 | --Changing owner to fake player object to support owner:GetMouse() | |
134 | game,owner = g,g.Players.LocalPlayer | |
135 | end | |
136 | ||
137 | --// Initializing \\-- | |
138 | local S = setmetatable({},{__index = function(s,i) return game:service(i) end}) | |
139 | local Plrs = S.Players | |
140 | local Plr = Plrs.LocalPlayer | |
141 | local Char = Plr.Character | |
142 | local Hum = Char:FindFirstChildOfClass'Humanoid' | |
143 | local RArm = Char["Right Arm"] | |
144 | local LArm = Char["Left Arm"] | |
145 | local RLeg = Char["Right Leg"] | |
146 | local LLeg = Char["Left Leg"] | |
147 | local Root = Char:FindFirstChild'HumanoidRootPart' | |
148 | local Torso = Char.Torso | |
149 | local Head = Char.Head | |
150 | local NeutralAnims = true | |
151 | local Attack = false | |
152 | local BloodPuddles = {} | |
153 | local Effects = {} | |
154 | local Debounces = {Debounces={}} | |
155 | local Mouse = Plr:GetMouse() | |
156 | local Hit = {} | |
157 | local Sine = 0 | |
158 | local Change = 1 | |
159 | local Souls = 0 | |
160 | --// Debounce System \\-- | |
161 | ||
162 | ||
163 | function Debounces:New(name,cooldown) | |
164 | local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0} | |
165 | setmetatable(aaaaa,{__index = Debounces}) | |
166 | Debounces.Debounces[name] = aaaaa | |
167 | return aaaaa | |
168 | end | |
169 | ||
170 | function Debounces:Use(overrideUsable) | |
171 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
172 | if(self.Usable or overrideUsable)then | |
173 | self.Usable = false | |
174 | self.CoolingDown = true | |
175 | local LastUse = time() | |
176 | self.LastUse = LastUse | |
177 | delay(self.Cooldown or 2,function() | |
178 | if(self.LastUse == LastUse)then | |
179 | self.CoolingDown = false | |
180 | self.Usable = true | |
181 | end | |
182 | end) | |
183 | end | |
184 | end | |
185 | ||
186 | function Debounces:Get(name) | |
187 | assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name))) | |
188 | for i,v in next, Debounces.Debounces do | |
189 | if(i == name)then | |
190 | return v; | |
191 | end | |
192 | end | |
193 | end | |
194 | ||
195 | function Debounces:GetProgressPercentage() | |
196 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
197 | if(self.CoolingDown and not self.Usable)then | |
198 | return math.max( | |
199 | math.floor( | |
200 | ( | |
201 | (time()-self.LastUse)/self.Cooldown or 2 | |
202 | )*100 | |
203 | ) | |
204 | ) | |
205 | else | |
206 | return 100 | |
207 | end | |
208 | - | naeeym2.PlayerToHideFrom = Plr |
208 | + | |
209 | ||
210 | --// Shortcut Variables \\-- | |
211 | local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ} | |
212 | local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV} | |
213 | - | tecks2.Text = "Chara" |
213 | + | |
214 | 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} | |
215 | local R3 = {N=Region3.new} | |
216 | local De = S.Debris | |
217 | local WS = workspace | |
218 | local Lght = S.Lighting | |
219 | local RepS = S.ReplicatedStorage | |
220 | local IN = Instance.new | |
221 | local CSK = ColorSequenceKeypoint.new | |
222 | local CS = ColorSequence.new | |
223 | --// Instance Creation Functions \\-- | |
224 | ||
225 | function Sound(parent,id,pitch,volume,looped,effect,autoPlay) | |
226 | local Sound = IN("Sound") | |
227 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
228 | Sound.Pitch = pitch or 1 | |
229 | Sound.Volume = volume or 1 | |
230 | Sound.Looped = looped or false | |
231 | if(autoPlay)then | |
232 | coroutine.wrap(function() | |
233 | repeat wait() until Sound.IsLoaded | |
234 | Sound.Playing = autoPlay or false | |
235 | end)() | |
236 | end | |
237 | if(not looped and effect)then | |
238 | Sound.Stopped:connect(function() | |
239 | Sound.Volume = 0 | |
240 | Sound:destroy() | |
241 | end) | |
242 | elseif(effect)then | |
243 | warn("Sound can't be looped and a sound effect!") | |
244 | end | |
245 | Sound.Parent =parent or Torso | |
246 | return Sound | |
247 | end | |
248 | function Part(parent,color,material,size,cframe,anchored,cancollide) | |
249 | local part = IN("Part") | |
250 | part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0) | |
251 | part.Material = (material or Enum.Material.SmoothPlastic) | |
252 | part.TopSurface,part.BottomSurface=10,10 | |
253 | part.Size = (size or V3.N(1,1,1)) | |
254 | part.CFrame = (cframe or CF.N(0,0,0)) | |
255 | part.Anchored = (anchored or false) | |
256 | part.CanCollide = (cancollide or false) | |
257 | part.Parent = (parent or Char) | |
258 | return part | |
259 | end | |
260 | function Mesh(parent,meshtype,meshid,textid,scale,offset) | |
261 | local part = IN("SpecialMesh") | |
262 | part.MeshId = meshid or "" | |
263 | part.TextureId = textid or "" | |
264 | part.Scale = scale or V3.N(1,1,1) | |
265 | part.Offset = offset or V3.N(0,0,0) | |
266 | part.MeshType = meshtype or Enum.MeshType.Sphere | |
267 | part.Parent = parent | |
268 | return part | |
269 | end | |
270 | ||
271 | NewInstance = function(instance,parent,properties) | |
272 | local inst = Instance.new(instance,parent) | |
273 | if(properties)then | |
274 | for i,v in next, properties do | |
275 | pcall(function() inst[i] = v end) | |
276 | end | |
277 | end | |
278 | return inst; | |
279 | end | |
280 | ||
281 | ||
282 | ||
283 | --// Extended ROBLOX tables \\-- | |
284 | 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}) | |
285 | --// Customization \\-- | |
286 | ||
287 | local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this | |
288 | local Remove_Hats = false | |
289 | local Remove_Clothing = true | |
290 | local PlayerSize = 1 | |
291 | local DamageColor = BrickColor.new'Really red' | |
292 | local MusicID = 935501955 | |
293 | local WalkSpeed = 8 | |
294 | local MaxSouls = 100 | |
295 | local MaxHealth = 500 | |
296 | ||
297 | ||
298 | if(_G.RefusedAnimation == nil) then _G.RefusedAnimation = false end | |
299 | ||
300 | --// Weapon and GUI creation, and Character Customization \\-- | |
301 | ||
302 | if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end | |
303 | if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end | |
304 | local Effects = IN("Folder",Char) | |
305 | Effects.Name = "Effects" | |
306 | ||
307 | Hum.MaxHealth = MaxHealth | |
308 | Hum.Health = MaxHealth | |
309 | ||
310 | 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)}) | |
311 | local KnifeMesh = Mesh(Knife,Enum.MeshType.FileMesh,"rbxassetid://121944778","rbxassetid://362719969",V3.N(1,1,1),V3.N()) | |
312 | 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://141116476",Transparency=NumberSequence.new(0,1),LockedToPart=true,Lifetime=NumberRange.new(1),Rate=150,Speed=NumberRange.new(0)}) | |
313 | 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://141116476",Transparency=NumberSequence.new(0.35,1),Lifetime=NumberRange.new(1,2),Rate=150,Speed=NumberRange.new(3)}) | |
314 | ||
315 | local KTrail = NewInstance("Trail",Knife,{ | |
316 | Attachment0=NewInstance("Attachment",Knife,{Position=V3.N(0,-.4,0)}), | |
317 | Attachment1=NewInstance("Attachment",Knife,{Position=V3.N(0,1.2,0)}), | |
318 | Color=CS(C3.N(1,0,0)), | |
319 | Enabled=false, | |
320 | Transparency=NumberSequence.new(0,1), | |
321 | Lifetime=1.25, | |
322 | }) | |
323 | local Hair = Part(Char,C3.N(0,0,0),Enum.Material.SmoothPlastic,V3.N(1,1,1),CF.N(),false,false) | |
324 | local HairMesh = Mesh(Hair,Enum.MeshType.FileMesh,"rbxassetid://250264520","rbxassetid://75975464",V3.N(1.05,1.05,1.05),V3.N()) | |
325 | ||
326 | NewInstance("PointLight",Knife,{Color=C3.N(1,0,0),Range=10,Brightness=3}) | |
327 | ||
328 | ||
329 | Hum.DisplayDistanceType = 'None' | |
330 | ||
331 | local naeeym2 = IN("BillboardGui",Char) | |
332 | naeeym2.AlwaysOnTop = true | |
333 | naeeym2.Size = UDim2.new(5,35,2,15) | |
334 | naeeym2.StudsOffset = V3.N(0,2.5,0) | |
335 | naeeym2.Adornee = Char.Head | |
336 | naeeym2.Name = "Name" | |
337 | local tecks2 = IN("TextLabel",naeeym2) | |
338 | tecks2.BackgroundTransparency = 1 | |
339 | tecks2.TextScaled = true | |
340 | tecks2.BorderSizePixel = 0 | |
341 | tecks2.Text = "Frisk (Chara Controlled)" | |
342 | tecks2.Font = Enum.Font.Bodoni | |
343 | tecks2.TextSize = 30 | |
344 | tecks2.TextStrokeTransparency = 0 | |
345 | tecks2.TextColor3 = C3.N(0,0,0) | |
346 | tecks2.TextStrokeColor3 = C3.N(.7,0,0) | |
347 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
348 | tecks2.Parent = naeeym2 | |
349 | ||
350 | ||
351 | IN("Shirt",Char) | |
352 | IN("Pants",Char) | |
353 | ||
354 | Hum.WalkSpeed = WalkSpeed | |
355 | if(PlayerSize ~= 1)then | |
356 | for _,v in next, Char:GetDescendats() do | |
357 | if(v:IsA'BasePart')then | |
358 | v.Size = v.Size * PlayerSize | |
359 | end | |
360 | end | |
361 | end | |
362 | ||
363 | ||
364 | for i = 1, 35 do | |
365 | local FACE = Part(Char,C3.N(0,0,0),Enum.Material.Neon,V3.N(1.01,.5,1.01),CF.N(),false,false) | |
366 | FACE.Transparency = 0+(i-1)/35.2 | |
367 | FACE.Name = 'ShadowFace' | |
368 | Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE | |
369 | NewInstance("Weld",Head,{Part0=Head,Part1=FACE,C0=CF.N(0,.35-(i-1)/75,0)}) | |
370 | --CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0)) | |
371 | end | |
372 | ||
373 | local LEye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false) | |
374 | local LEyeM = Mesh(LEye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N()) | |
375 | local LEyeW = NewInstance("Weld",LEye,{Part0=Head,Part1=LEye,C0=CF.N(-.2,.2,-.49)}) | |
376 | ||
377 | local REye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false) | |
378 | local REyeM = Mesh(REye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N()) | |
379 | local REyeW = NewInstance("Weld",REye,{Part0=Head,Part1=REye,C0=CF.N(.2,.2,-.49)}) | |
380 | ||
381 | ||
382 | pcall(function() | |
383 | Char.LeftWing:destroy() | |
384 | Char.ReaperShadowHead:destroy() | |
385 | end) | |
386 | ||
387 | ||
388 | local Music = Sound(Torso,MusicID,1,3,true,false,true) | |
389 | Music.Name = 'Music' | |
390 | ||
391 | --// Stop animations \\-- | |
392 | for _,v in next, Hum:GetPlayingAnimationTracks() do | |
393 | v:Stop(); | |
394 | end | |
395 | ||
396 | pcall(game.Destroy,Char:FindFirstChild'Animate') | |
397 | pcall(game.Destroy,Hum:FindFirstChild'Animator') | |
398 | ||
399 | --// Joints \\-- | |
400 | ||
401 | 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)}) | |
402 | 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)}) | |
403 | local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)}) | |
404 | local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)}) | |
405 | local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)}) | |
406 | local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso}) | |
407 | local HW = NewInstance('Motor',Char,{Part0=RArm,Part1=Knife,C0=CF.N(0,-1,-1)*CF.A(M.R(-90),0,0)}) | |
408 | local HW2 = NewInstance('Motor',Char,{Part0=Head,Part1=Hair,C0=CF.N(0,.25,0)}) | |
409 | ||
410 | local LSC0 = LS.C0 | |
411 | local RSC0 = RS.C0 | |
412 | local NKC0 = NK.C0 | |
413 | local LHC0 = LH.C0 | |
414 | local RHC0 = RH.C0 | |
415 | local RJC0 = RJ.C0 | |
416 | ||
417 | --// Artificial HB \\-- | |
418 | ||
419 | local ArtificialHB = IN("BindableEvent", script) | |
420 | ArtificialHB.Name = "Heartbeat" | |
421 | ||
422 | script:WaitForChild("Heartbeat") | |
423 | ||
424 | local tf = 0 | |
425 | local allowframeloss = false | |
426 | local tossremainder = false | |
427 | local lastframe = tick() | |
428 | local frame = 1/Frame_Speed | |
429 | ArtificialHB:Fire() | |
430 | ||
431 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
432 | tf = tf + s | |
433 | if tf >= frame then | |
434 | if allowframeloss then | |
435 | script.Heartbeat:Fire() | |
436 | lastframe = tick() | |
437 | else | |
438 | for i = 1, math.floor(tf / frame) do | |
439 | ArtificialHB:Fire() | |
440 | end | |
441 | lastframe = tick() | |
442 | end | |
443 | if tossremainder then | |
444 | tf = 0 | |
445 | else | |
446 | tf = tf - frame * math.floor(tf / frame) | |
447 | end | |
448 | end | |
449 | end) | |
450 | ||
451 | function swait(num) | |
452 | if num == 0 or num == nil then | |
453 | ArtificialHB.Event:wait() | |
454 | else | |
455 | for i = 0, num do | |
456 | ArtificialHB.Event:wait() | |
457 | end | |
458 | end | |
459 | end | |
460 | ||
461 | ||
462 | --// Effect Function(s) \\-- | |
463 | ||
464 | function Bezier(startpos, pos2, pos3, endpos, t) | |
465 | local A = startpos:lerp(pos2, t) | |
466 | local B = pos2:lerp(pos3, t) | |
467 | local C = pos3:lerp(endpos, t) | |
468 | local lerp1 = A:lerp(B, t) | |
469 | local lerp2 = B:lerp(C, t) | |
470 | local cubic = lerp1:lerp(lerp2, t) | |
471 | return cubic | |
472 | end | |
473 | ||
474 | function Tween(obj,props,time,easing,direction,repeats,backwards) | |
475 | local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false) | |
476 | local tween = S.TweenService:Create(obj, info, props) | |
477 | ||
478 | tween:Play() | |
479 | end | |
480 | ||
481 | local FXTable = {} | |
482 | ||
483 | coroutine.resume(coroutine.create(function() | |
484 | while true do | |
485 | for i = 1, #FXTable do | |
486 | local data = FXTable[i] | |
487 | if(data)then | |
488 | local Frame = data.Frame | |
489 | local FX = data.Effect or 'ResizeAndFade' | |
490 | local Parent = data.Parent or Effects | |
491 | local Color = data.Color or C3.N(0,0,0) | |
492 | local Size = data.Size or V3.N(1,1,1) | |
493 | local MoveDir = data.MoveDirection or nil | |
494 | local MeshData = data.Mesh or nil | |
495 | local SndData = data.Sound or nil | |
496 | local Frames = data.Frames or 45 | |
497 | local CFra = data.CFrame or Torso.CFrame | |
498 | local Settings = data.FXSettings or {} | |
499 | local Prt,Msh,Snd = data.Part,data.Mesh,data.Sound | |
500 | local grow = data.Grow | |
501 | ||
502 | local MoveSpeed = nil; | |
503 | if(MoveDir)then | |
504 | MoveSpeed = (CFra.p - MoveDir).magnitude/Frames | |
505 | end | |
506 | if(FX ~= 'Arc')then | |
507 | Frame = Frame + 1 | |
508 | if(FX == "Fade")then | |
509 | Prt.Transparency = (Frame/Frames) | |
510 | elseif(FX == "Resize")then | |
511 | if(not Settings.EndSize)then | |
512 | Settings.EndSize = V3.N(0,0,0) | |
513 | end | |
514 | if(Settings.EndIsIncrement)then | |
515 | if(Msh)then | |
516 | Msh.Scale = Msh.Scale + Settings.EndSize | |
517 | else | |
518 | Prt.Size = Prt.Size + Settings.EndSize | |
519 | end | |
520 | else | |
521 | if(Msh)then | |
522 | Msh.Scale = Msh.Scale - grow/Frames | |
523 | else | |
524 | Prt.Size = Prt.Size - grow/Frames | |
525 | end | |
526 | end | |
527 | elseif(FX == "ResizeAndFade")then | |
528 | if(not Settings.EndSize)then | |
529 | Settings.EndSize = V3.N(0,0,0) | |
530 | end | |
531 | if(Settings.EndIsIncrement)then | |
532 | if(Msh)then | |
533 | Msh.Scale = Msh.Scale + Settings.EndSize | |
534 | else | |
535 | Prt.Size = Prt.Size + Settings.EndSize | |
536 | end | |
537 | else | |
538 | if(Msh)then | |
539 | Msh.Scale = Msh.Scale - grow/Frames | |
540 | else | |
541 | Prt.Size = Prt.Size - grow/Frames | |
542 | end | |
543 | end | |
544 | Prt.Transparency = (Frame/Frames) | |
545 | end | |
546 | if(Settings.RandomizeCFrame)then | |
547 | Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360)) | |
548 | end | |
549 | if(MoveDir and MoveSpeed)then | |
550 | local Orientation = Prt.Orientation | |
551 | Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed) | |
552 | Prt.Orientation = Orientation | |
553 | end | |
554 | if(Prt.Transparency >= 1 or Frame >= Frames)then | |
555 | Prt:destroy() | |
556 | table.remove(FXTable,i) | |
557 | else | |
558 | data.Frame = Frame | |
559 | end | |
560 | else | |
561 | local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End | |
562 | if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end | |
563 | if(start and endP)then | |
564 | local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
565 | local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
566 | Frame = Frame + (Settings.Speed or 0.01) | |
567 | if(Settings.Home)then | |
568 | endP = Settings.Home.CFrame | |
569 | end | |
570 | Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame) | |
571 | if(Prt.Transparency >= 1 or Frame >= Frames)then | |
572 | if(Settings.RemoveOnGoal)then | |
573 | Prt:destroy() | |
574 | end | |
575 | end | |
576 | else | |
577 | Prt:destroy() | |
578 | end | |
579 | end | |
580 | end | |
581 | end | |
582 | swait() | |
583 | end | |
584 | end)) | |
585 | ||
586 | function Effect(data) | |
587 | local FX = data.Effect or 'ResizeAndFade' | |
588 | local Parent = data.Parent or Effects | |
589 | local Color = data.Color or C3.N(0,0,0) | |
590 | local Size = data.Size or V3.N(1,1,1) | |
591 | local MoveDir = data.MoveDirection or nil | |
592 | local MeshData = data.Mesh or nil | |
593 | local SndData = data.Sound or nil | |
594 | local Frames = data.Frames or 45 | |
595 | local Manual = data.Manual or nil | |
596 | local Material = data.Material or nil | |
597 | local CFra = data.CFrame or Torso.CFrame | |
598 | local Settings = data.FXSettings or {} | |
599 | local Shape = data.Shape or Enum.PartType.Block | |
600 | local Snd,Prt,Msh; | |
601 | coroutine.wrap(function() | |
602 | if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then | |
603 | Prt = Manual | |
604 | else | |
605 | Prt = Part(Parent,Color,Material,Size,CFra,true,false) | |
606 | Prt.Shape = Shape | |
607 | end | |
608 | if(typeof(MeshData) == 'table')then | |
609 | Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset) | |
610 | elseif(typeof(MeshData) == 'Instance')then | |
611 | Msh = MeshData:Clone() | |
612 | Msh.Parent = Prt | |
613 | elseif(Shape == Enum.PartType.Block)then | |
614 | Msh = Mesh(Prt,Enum.MeshType.Brick) | |
615 | end | |
616 | if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then | |
617 | Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true) | |
618 | end | |
619 | if(Snd)then | |
620 | repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0 | |
621 | Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch | |
622 | end | |
623 | Size = (Msh and Msh.Scale or Size) | |
624 | local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2) | |
625 | ||
626 | local MoveSpeed = nil; | |
627 | if(MoveDir)then | |
628 | MoveSpeed = (CFra.p - MoveDir).magnitude/Frames | |
629 | end | |
630 | if(FX ~= 'Arc')then | |
631 | for Frame = 1, Frames do | |
632 | if(FX == "Fade")then | |
633 | Prt.Transparency = (Frame/Frames) | |
634 | elseif(FX == "Resize")then | |
635 | if(not Settings.EndSize)then | |
636 | Settings.EndSize = V3.N(0,0,0) | |
637 | end | |
638 | if(Settings.EndIsIncrement)then | |
639 | if(Msh)then | |
640 | Msh.Scale = Msh.Scale + Settings.EndSize | |
641 | else | |
642 | Prt.Size = Prt.Size + Settings.EndSize | |
643 | end | |
644 | else | |
645 | if(Msh)then | |
646 | Msh.Scale = Msh.Scale - grow/Frames | |
647 | else | |
648 | Prt.Size = Prt.Size - grow/Frames | |
649 | end | |
650 | end | |
651 | elseif(FX == "ResizeAndFade")then | |
652 | if(not Settings.EndSize)then | |
653 | Settings.EndSize = V3.N(0,0,0) | |
654 | end | |
655 | if(Settings.EndIsIncrement)then | |
656 | if(Msh)then | |
657 | Msh.Scale = Msh.Scale + Settings.EndSize | |
658 | else | |
659 | Prt.Size = Prt.Size + Settings.EndSize | |
660 | end | |
661 | else | |
662 | if(Msh)then | |
663 | Msh.Scale = Msh.Scale - grow/Frames | |
664 | else | |
665 | Prt.Size = Prt.Size - grow/Frames | |
666 | end | |
667 | end | |
668 | Prt.Transparency = (Frame/Frames) | |
669 | end | |
670 | if(Settings.RandomizeCFrame)then | |
671 | Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360)) | |
672 | end | |
673 | if(MoveDir and MoveSpeed)then | |
674 | local Orientation = Prt.Orientation | |
675 | Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed) | |
676 | Prt.Orientation = Orientation | |
677 | end | |
678 | swait() | |
679 | end | |
680 | Prt:destroy() | |
681 | else | |
682 | local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End | |
683 | if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end | |
684 | if(start and endP)then | |
685 | local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
686 | local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
687 | for Frame = 0, 1, (Settings.Speed or 0.01) do | |
688 | if(Settings.Home)then | |
689 | endP = Settings.Home.CFrame | |
690 | end | |
691 | Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame) | |
692 | end | |
693 | if(Settings.RemoveOnGoal)then | |
694 | Prt:destroy() | |
695 | end | |
696 | else | |
697 | Prt:destroy() | |
698 | assert(start,"You need a start position!") | |
699 | assert(endP,"You need a start position!") | |
700 | end | |
701 | end | |
702 | end)() | |
703 | return Prt,Msh,Snd | |
704 | end | |
705 | ||
706 | ||
707 | ||
708 | function SoulSteal(whom,human) | |
709 | local torso = (whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart' or whom:FindFirstChild'Torso') | |
710 | local succ, health, alive = pcall(function() return whom:FindFirstChildOfClass'Humanoid'.Health, whom:FindFirstChildOfClass'Humanoid'.Health > 0 end) | |
711 | if(torso and torso:IsA'BasePart' and alive == true)then | |
712 | whom:FindFirstChildOfClass'Humanoid'.Health = 0 | |
713 | whom:BreakJoints() | |
714 | local Model = IN("Model",Effects) | |
715 | warn('Soul stolen from '..whom.Name) | |
716 | Model.Name = whom.Name.."'s Soul" | |
717 | local Soul = Part(Model,(human and BrickColor.new'Really red' or BrickColor.new(C3.N(1,1,1))),'Glass',V3.N(1,1,1),torso.CFrame,true,false) | |
718 | Soul.CanCollide=false | |
719 | Mesh(Soul,Enum.MeshType.Sphere) | |
720 | Soul.Name = 'Head' | |
721 | if(whom.Name == 'CKbackup')then | |
722 | Soul.Color = C3.N(1,1,1) | |
723 | 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)}) | |
724 | end | |
725 | local Hoom = NewInstance("Humanoid",Model,{MaxHealth=(health <= 10000 and health/2 or 10000),Health=(health <= 10000 and health/2 or 10000)}) | |
726 | local AT0 = NewInstance("Attachment",Soul,{Position=V3.N(0,.5,0)}) | |
727 | local AT1 = NewInstance("Attachment",Soul,{Position=V3.N(0,-.5,0)}) | |
728 | 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}) | |
729 | NewInstance("PointLight",Soul,{Color=Soul.Color,Range=10,Brightness=(human and 3 or .5)}) | |
730 | ||
731 | local turdso = Soul:Clone() | |
732 | turdso.Name = "Torso" | |
733 | turdso.CanCollide = false | |
734 | turdso.Anchored = true | |
735 | turdso.CFrame = Soul.CFrame | |
736 | turdso.Parent = Model | |
737 | turdso.Size = V3.N() | |
738 | turdso.Transparency=1 | |
739 | local Distance = math.huge | |
740 | repeat | |
741 | Soul.CFrame = CF.N(Soul.Position,Torso.Position)*CF.N(0,0,-1) | |
742 | turdso.CFrame = Soul.CFrame | |
743 | Distance = (Soul.CFrame.p-Torso.CFrame.p).magnitude | |
744 | swait() | |
745 | until Hoom.Health <= 0 or not Soul.Parent or Distance <= 1.2 | |
746 | if(Soul.Parent and Hoom.Health > 0)then | |
747 | Model:destroy() | |
748 | Effect{ | |
749 | Effect="ResizeAndFade", | |
750 | Mesh={Enum.MeshType.Sphere}, | |
751 | Color = Soul.Color, | |
752 | CFrame=Torso.CFrame, | |
753 | Size=V3.N(3,3,3), | |
754 | Material=Enum.Material.Neon, | |
755 | Sound={SoundId=444667859,Pitch=1,Volume=2.5}, | |
756 | FXSettings={ | |
757 | EndSize=V3.N(6,6,6), | |
758 | } | |
759 | } | |
760 | Souls = Souls + (human and 1 or .1) | |
761 | warn("Souls: "..Souls) | |
762 | MaxHealth = MaxHealth + Hoom.Health | |
763 | Hum.Health = Hum.Health + Hoom.Health | |
764 | for i = 1, 5 do | |
765 | Effect{ | |
766 | Effect="Fade", | |
767 | Color = Soul.Color, | |
768 | MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p | |
769 | } | |
770 | end | |
771 | else | |
772 | ||
773 | warn("Soul destroyed!") | |
774 | for i = 1, 5 do | |
775 | Effect{ | |
776 | Effect="Fade", | |
777 | Color = Soul.Color, | |
778 | CFrame=Soul.CFrame, | |
779 | MoveDirection = (Soul.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p | |
780 | } | |
781 | end | |
782 | Effect{ | |
783 | Effect="ResizeAndFade", | |
784 | Mesh={Enum.MeshType.Sphere}, | |
785 | Sound={SoundId=444667859,Pitch=1,Volume=5}, | |
786 | Color = Soul.Color, | |
787 | CFrame=Soul.CFrame, | |
788 | Size=V3.N(3,3,3), | |
789 | Material=Enum.Material.Neon, | |
790 | FXSettings={ | |
791 | EndSize=V3.N(6,6,6), | |
792 | } | |
793 | } | |
794 | Model:destroy() | |
795 | end | |
796 | end | |
797 | end | |
798 | ||
799 | --// Other Functions \\ -- | |
800 | ||
801 | function getRegion(point,range,ignore) | |
802 | return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100) | |
803 | end | |
804 | ||
805 | function clerp(startCF,endCF,alpha) | |
806 | return startCF:lerp(endCF, alpha) | |
807 | end | |
808 | ||
809 | function GetTorso(char) | |
810 | return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart' | |
811 | end | |
812 | ||
813 | function ShowDamage(Pos, Text, Time, Color) | |
814 | coroutine.wrap(function() | |
815 | local Rate = (1 / Frame_Speed) | |
816 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
817 | local Text = (Text or "") | |
818 | local Time = (Time or 2) | |
819 | local Color = (Color or Color3.new(1, 0, 1)) | |
820 | local EffectPart = NewInstance("Part",Effects,{ | |
821 | Material=Enum.Material.SmoothPlastic, | |
822 | Reflectance = 0, | |
823 | Transparency = 1, | |
824 | BrickColor = BrickColor.new(Color), | |
825 | Name = "Effect", | |
826 | Size = Vector3.new(0,0,0), | |
827 | Anchored = true, | |
828 | CFrame = CF.N(Pos) | |
829 | }) | |
830 | local BillboardGui = NewInstance("BillboardGui",EffectPart,{ | |
831 | Size = UDim2.new(1.25, 0, 1.25, 0), | |
832 | Adornee = EffectPart, | |
833 | }) | |
834 | local TextLabel = NewInstance("TextLabel",BillboardGui,{ | |
835 | BackgroundTransparency = 1, | |
836 | Size = UDim2.new(1, 0, 1, 0), | |
837 | Text = Text, | |
838 | Font = "Arcade", | |
839 | TextColor3 = Color, | |
840 | TextStrokeColor3 = Color3.new(0,0,0), | |
841 | TextStrokeTransparency=0, | |
842 | TextScaled = true, | |
843 | }) | |
844 | S.Debris:AddItem(EffectPart, (Time)) | |
845 | EffectPart.Parent = workspace | |
846 | delay(0, function() | |
847 | Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out) | |
848 | local Frames = (Time / Rate) | |
849 | for Frame = 1, Frames do | |
850 | swait() | |
851 | local Percent = (Frame / Frames) | |
852 | TextLabel.TextTransparency = Percent | |
853 | TextLabel.TextStrokeTransparency = Percent | |
854 | end | |
855 | if EffectPart and EffectPart.Parent then | |
856 | EffectPart:Destroy() | |
857 | end | |
858 | end) end)() | |
859 | end | |
860 | ||
861 | function Kill(whom) | |
862 | if(whom.Name ~= 'Nebula_Zorua')then | |
863 | local isPlr = Plrs:GetPlayerFromCharacter(whom) ~= nil | |
864 | coroutine.wrap(SoulSteal)(whom,isPlr) | |
865 | for _,v in next, whom:children() do | |
866 | if(v:IsA'BasePart')then | |
867 | v.Parent = Effects | |
868 | v:ClearAllChildren() | |
869 | v.Anchored = true | |
870 | v.CanCollide = false | |
871 | v.Transparency = 1 | |
872 | local dust = NewInstance("ParticleEmitter",v,{ | |
873 | Color = ColorSequence.new(C3.N(1,1,1)), | |
874 | LightEmission=0, | |
875 | LightInfluence=1, | |
876 | Size=NumberSequence.new{NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(1,0,0)}, | |
877 | Texture="rbxassetid://284205403", | |
878 | Transparency=NumberSequence.new{NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)}, | |
879 | Lifetime = NumberRange.new(1), | |
880 | Rate=150, | |
881 | Acceleration = V3.N(0,10,0), | |
882 | Speed = NumberRange.new(5), | |
883 | Enabled = true | |
884 | }) | |
885 | delay(1, function() | |
886 | dust.Enabled = false | |
887 | S.Debris:AddItem(v,2) | |
888 | end) | |
889 | end | |
890 | end | |
891 | else | |
892 | warn"nope. nawt happenin'" | |
893 | end | |
894 | end | |
895 | ||
896 | function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult) | |
897 | if(who)then | |
898 | local hum = who:FindFirstChildOfClass'Humanoid' | |
899 | local Damage = M.RNG(minDam,maxDam) | |
900 | local canHit = true | |
901 | if(hum)then | |
902 | for _, p in pairs(Hit) do | |
903 | if p[1] == hum then | |
904 | if(time() - p[2] < 0.4) then | |
905 | canHit = false | |
906 | else | |
907 | Hit[_] = nil | |
908 | end | |
909 | end | |
910 | end | |
911 | if(canHit)then | |
912 | table.insert(Hit,{hum,time()}) | |
913 | if(GetTorso(who))then | |
914 | Sound(GetTorso(who),406913243,1,10,false,true,true) | |
915 | end | |
916 | if(hum.Health >= math.huge)then | |
917 | Kill(who) | |
918 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
919 | 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) | |
920 | end | |
921 | else | |
922 | local player = S.Players:GetPlayerFromCharacter(who) | |
923 | if(Type == "Fire")then | |
924 | --idk.. | |
925 | else | |
926 | local c = Instance.new("ObjectValue",hum) | |
927 | c.Name = "creator" | |
928 | c.Value = Plr | |
929 | game:service'Debris':AddItem(c,0.35) | |
930 | local Crit = false | |
931 | if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then | |
932 | Crit = true | |
933 | Damage = Damage*(critMult or 2) | |
934 | end | |
935 | Damage = Damage*((Souls/5)+1) | |
936 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
937 | 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)) | |
938 | end | |
939 | ||
940 | if(hum.Health - Damage <= 0)then | |
941 | Kill(who) | |
942 | else | |
943 | hum.Health = hum.Health - Damage | |
944 | if(Type == 'Knockback' and GetTorso(who))then | |
945 | local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit | |
946 | local body = NewInstance('BodyVelocity',GetTorso(who),{ | |
947 | P = 500, | |
948 | maxForce = V3.N(math.huge,0,math.huge), | |
949 | velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05 | |
950 | }) | |
951 | game:service'Debris':AddItem(body,.5) | |
952 | elseif(Type == "Electric")then | |
953 | if(M.RNG(1,100) >= critChance)then | |
954 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
955 | 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) | |
956 | end | |
957 | local asd = hum.WalkSpeed/2 | |
958 | hum.WalkSpeed = asd | |
959 | local paralyzed = true | |
960 | coroutine.wrap(function() | |
961 | while paralyzed do | |
962 | swait(25) | |
963 | if(M.RNG(1,25) == 1)then | |
964 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
965 | 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) | |
966 | end | |
967 | hum.PlatformStand = true | |
968 | end | |
969 | end | |
970 | end)() | |
971 | delay(4, function() | |
972 | paralyzed = false | |
973 | hum.WalkSpeed = hum.WalkSpeed + asd | |
974 | end) | |
975 | end | |
976 | ||
977 | elseif(Type == 'Knockdown' and GetTorso(who))then | |
978 | local rek = GetTorso(who) | |
979 | hum.PlatformStand = true | |
980 | delay(1,function() | |
981 | hum.PlatformStand = false | |
982 | end) | |
983 | local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit | |
984 | local bodvol = NewInstance("BodyVelocity",rek,{ | |
985 | velocity = angle * Knock, | |
986 | P = 5000, | |
987 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
988 | }) | |
989 | local rl = NewInstance("BodyAngularVelocity",rek,{ | |
990 | P = 3000, | |
991 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
992 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
993 | }) | |
994 | game:GetService("Debris"):AddItem(bodvol, .5) | |
995 | game:GetService("Debris"):AddItem(rl, .5) | |
996 | end | |
997 | end | |
998 | end | |
999 | end | |
1000 | end | |
1001 | end | |
1002 | end | |
1003 | end | |
1004 | ||
1005 | ||
1006 | function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult) | |
1007 | for _,v in next, getRegion(where,range,{Char}) do | |
1008 | if(v.Name ~= 'Nebula_Zorua')then | |
1009 | if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then | |
1010 | DealDamage(v.Parent,minDam,maxDam,Knock,Type,critChance,critMult) | |
1011 | end | |
1012 | end | |
1013 | end | |
1014 | end | |
1015 | ||
1016 | function AOEKill(where,range) | |
1017 | for _,v in next, getRegion(where,range,{Char,Effects}) do | |
1018 | local succ,alive = pcall(function() return v.Parent:FindFirstChildOfClass'Humanoid'.Health > 0 end) | |
1019 | if(v.Name ~= 'Nebula_Zorua')then | |
1020 | if(v.Parent and alive == true)then | |
1021 | coroutine.wrap(Kill)(v.Parent) | |
1022 | end | |
1023 | end | |
1024 | end | |
1025 | end | |
1026 | ||
1027 | function AOEHeal(where,range,amount) | |
1028 | local healed = {} | |
1029 | for _,v in next, getRegion(where,range,{Char}) do | |
1030 | local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil) | |
1031 | if(hum and not healed[hum])then | |
1032 | hum.Health = hum.Health + amount | |
1033 | if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then | |
1034 | 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) | |
1035 | end | |
1036 | end | |
1037 | end | |
1038 | end | |
1039 | ||
1040 | ||
1041 | --// Attack Functions \\-- | |
1042 | ||
1043 | ||
1044 | - | LEye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false) |
1044 | + | |
1045 | Attack = true | |
1046 | NeutralAnims = false | |
1047 | local sound = Sound(Knife,437475935,1,5,false,true,false) | |
1048 | for i = 0, 2, 0.1 do | |
1049 | swait() | |
1050 | local Alpha = .2 | |
1051 | 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) | |
1052 | 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) | |
1053 | 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) | |
1054 | 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) | |
1055 | 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) | |
1056 | 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) | |
1057 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1058 | end | |
1059 | KTrail.Enabled = true | |
1060 | sound:Play() | |
1061 | for i = 0, 2.5, 0.1 do | |
1062 | swait() | |
1063 | AOEDamage(Knife.CFrame.p,1,15,30,0,"Normal",0,1) | |
1064 | local Alpha = .25 | |
1065 | 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) | |
1066 | 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) | |
1067 | 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) | |
1068 | 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) | |
1069 | 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) | |
1070 | 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) | |
1071 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1072 | end | |
1073 | KTrail.Enabled = false | |
1074 | Attack = false | |
1075 | NeutralAnims = true | |
1076 | end | |
1077 | ||
1078 | Mouse.Button1Down:connect(function() | |
1079 | if(Attack)then return end | |
1080 | Slash() | |
1081 | end) | |
1082 | ||
1083 | Mouse.KeyDown:connect(function(k) | |
1084 | if(Attack)then return end | |
1085 | if(k == 'z')then AOEKill(Root.CFrame.p,25) end -- TODO: Animation and effects | |
1086 | if(k == 'q')then WalkSpeed = (WalkSpeed == 8 and 32 or 8) end | |
1087 | end) | |
1088 | ||
1089 | ||
1090 | function Refuse() | |
1091 | Attack = true | |
1092 | warn("B u t i t r e f u s e d.") | |
1093 | local oMH = MaxHealth | |
1094 | MaxHealth = "inf" | |
1095 | Hum.MaxHealth = "inf" | |
1096 | Hum.Health = "inf" | |
1097 | Char.Parent = nil | |
1098 | Hum:destroy() | |
1099 | if(not _G.RefusedAnimation)then | |
1100 | _G.RefusedAnimation = true | |
1101 | ||
1102 | ||
1103 | local Soul; | |
1104 | function Soul(where,decalId) | |
1105 | local destroy = false | |
1106 | local soul = NewInstance("Part",workspace) | |
1107 | soul.Name = "Soul" | |
1108 | soul.Transparency=1 | |
1109 | soul.Size = V3.N(2,2,.05) | |
1110 | soul.Anchored=true | |
1111 | soul.CanCollide=false | |
1112 | soul.CFrame = where | |
1113 | local heartF = NewInstance("Decal",soul,{Face=Enum.NormalId.Front,Texture="rbxassetid://"..decalId}) | |
1114 | local heartB = NewInstance("Decal",soul,{Face=Enum.NormalId.Back,Texture="rbxassetid://"..decalId}) | |
1115 | return soul,heartF,heartB | |
1116 | end | |
1117 | local owo = Root.CFrame | |
1118 | local s,f,b = Soul(owo,1569347904) | |
1119 | - | v.ShirtTemplate = "rbxassetid://344089667" |
1119 | + | |
1120 | local snd = Sound(s,862552636,1,5,false,false,false) | |
1121 | - | v.PantsTemplate = "rbxassetid://344084364" |
1121 | + | |
1122 | f.Texture = "rbxassetid://1569348344" | |
1123 | b.Texture = "rbxassetid://1569348344" | |
1124 | swait(15) | |
1125 | snd:Stop() | |
1126 | swait(60) | |
1127 | print'lol' | |
1128 | for i = 0, 6, .1 do | |
1129 | swait() | |
1130 | - | NewInstance("Decal",Head,{Name='face',Face=Enum.NormalId.Front,Texture="rbxassetid://404306534"}) |
1130 | + | |
1131 | end | |
1132 | - | face.Texture = "rbxassetid://404306534" |
1132 | + | |
1133 | snd:Play() | |
1134 | s.CFrame = owo | |
1135 | f.Texture = "rbxassetid://1569347904" | |
1136 | b.Texture = "rbxassetid://1569347904" | |
1137 | swait(15) | |
1138 | snd:Stop() | |
1139 | swait(60) | |
1140 | - | Hum.Name = 'Chara' |
1140 | + | |
1141 | s:destroy() | |
1142 | end | |
1143 | ||
1144 | RJ.Parent = Char | |
1145 | LS.Parent = Char | |
1146 | RS.Parent = Char | |
1147 | LH.Parent = Char | |
1148 | RH.Parent = Char | |
1149 | NK.Parent = Char | |
1150 | ||
1151 | LArm.Parent = Char | |
1152 | RArm.Parent = Char | |
1153 | LLeg.Parent = Char | |
1154 | LArm.Parent = Char | |
1155 | Root.Parent = Char | |
1156 | Torso.Parent = Char | |
1157 | Head.Parent = Char | |
1158 | ||
1159 | Knife.Parent = Char | |
1160 | Hair.Parent = Char | |
1161 | ||
1162 | HW.Parent = Char | |
1163 | HW2.Parent = Char | |
1164 | ||
1165 | ||
1166 | REye:destroy() | |
1167 | LEye:destroy() | |
1168 | ||
1169 | for _,v in next, Char:children() do | |
1170 | if(v.Name == 'ShadowFace')then v:destroy() end | |
1171 | end | |
1172 | LEye = Part(Char,C3.N(0,254,254),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false) | |
1173 | LEyeM = Mesh(LEye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N()) | |
1174 | LEyeW = NewInstance("Weld",LEye,{Part0=Head,Part1=LEye,C0=CF.N(-.2,.2,-.49)}) | |
1175 | ||
1176 | REye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false) | |
1177 | REyeM = Mesh(REye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N()) | |
1178 | REyeW = NewInstance("Weld",REye,{Part0=Head,Part1=REye,C0=CF.N(.2,.2,-.49)}) | |
1179 | for i = 1, 35 do | |
1180 | local FACE = Part(Char,C3.N(0,0,0),Enum.Material.Neon,V3.N(1.01,.5,1.01),CF.N(),false,false) | |
1181 | FACE.Transparency = 0+(i-1)/35.2 | |
1182 | FACE.Name = 'ShadowFace' | |
1183 | Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE | |
1184 | NewInstance("Weld",Head,{Part0=Head,Part1=FACE,C0=CF.N(0,.35-(i-1)/75,0)}) | |
1185 | --CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0)) | |
1186 | end | |
1187 | Hum = NewInstance("Humanoid",Char,{DisplayDistanceType='None'}) | |
1188 | ConnectHum() | |
1189 | MaxHealth = oMH | |
1190 | Hum.MaxHealth = MaxHealth | |
1191 | Hum.Health = MaxHealth | |
1192 | swait(5) | |
1193 | Char.Parent = workspace | |
1194 | ||
1195 | Attack = false | |
1196 | end | |
1197 | ||
1198 | function ConnectHum() | |
1199 | Hum.Died:connect(Refuse) | |
1200 | end | |
1201 | ConnectHum() | |
1202 | ||
1203 | ||
1204 | --// Wrap it all up \\-- | |
1205 | while true do | |
1206 | swait() | |
1207 | Sine = Sine + Change | |
1208 | if(not Music)then | |
1209 | Music = Sound(Torso,MusicID,1,3,true,false,true) | |
1210 | Music.Name = 'Music' | |
1211 | end | |
1212 | Music.Pitch = 1 | |
1213 | Music.Volume = 5 | |
1214 | Music.SoundId = "rbxassetid://"..MusicID | |
1215 | Music.Parent = Torso | |
1216 | Music:Resume() | |
1217 | 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) | |
1218 | local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1) | |
1219 | 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") | |
1220 | if(not Effects or not Effects.Parent)then | |
1221 | Effects = IN("Model",Char) | |
1222 | Effects.Name = "Effects" | |
1223 | end | |
1224 | Hum.WalkSpeed = WalkSpeed | |
1225 | if(State == 'Walk')then | |
1226 | if(Hum.WalkSpeed >= 24)then | |
1227 | local wsVal = 22 / (Hum.WalkSpeed/16) | |
1228 | local Alpha = math.min(.1 * (Hum.WalkSpeed/16),1) | |
1229 | Change = 2 | |
1230 | 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) | |
1231 | 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) | |
1232 | else | |
1233 | Change = .9 | |
1234 | local wsVal = 8 / (Hum.WalkSpeed/8) | |
1235 | local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1) | |
1236 | 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) | |
1237 | 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) | |
1238 | end | |
1239 | else | |
1240 | RH.C1 = RH.C1:lerp(CF.N(0,1,0),.1) | |
1241 | LH.C1 = LH.C1:lerp(CF.N(0,1,0),.1) | |
1242 | end | |
1243 | for _,v in next, Char:children() do | |
1244 | if(v:IsA'Accessory')then | |
1245 | v:destroy() | |
1246 | elseif(v:IsA'Shirt')then | |
1247 | v.ShirtTemplate = "rbxassetid://408324194" | |
1248 | elseif(v:IsA'Pants')then | |
1249 | v.PantsTemplate = "rbxassetid://370320704" | |
1250 | elseif(v:IsA'CharacterMesh')then | |
1251 | v:destroy() | |
1252 | elseif(v:FindFirstChildOfClass'ShirtGraphic')then | |
1253 | v:FindFirstChildOfClass'ShirtGraphic':destroy() | |
1254 | end | |
1255 | end | |
1256 | local face = Head:FindFirstChild'face' | |
1257 | if(not face)then | |
1258 | NewInstance("Decal",Head,{Name='face',Face=Enum.NormalId.Front,Texture="rbxassetid://67493659"}) | |
1259 | else | |
1260 | face.Texture = "rbxassetid://67493659" | |
1261 | end | |
1262 | RArm.BrickColor = BrickColor.new'Pastel brown' | |
1263 | LArm.BrickColor = BrickColor.new'Pastel brown' | |
1264 | RLeg.BrickColor = BrickColor.new'Pastel brown' | |
1265 | LLeg.BrickColor = BrickColor.new'Pastel brown' | |
1266 | Torso.BrickColor = BrickColor.new'Pastel brown' | |
1267 | Head.BrickColor = BrickColor.new'Pastel brown' | |
1268 | Hum.Name = 'Frisk' | |
1269 | if(Hum.MaxHealth ~= MaxHealth)then | |
1270 | Hum.MaxHealth = MaxHealth | |
1271 | end | |
1272 | Hum.DisplayDistanceType='None' | |
1273 | if(NeutralAnims)then | |
1274 | if(State == 'Idle')then | |
1275 | Change = 1 | |
1276 | local Alpha = .1 | |
1277 | 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) | |
1278 | 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) | |
1279 | 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) | |
1280 | 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) | |
1281 | 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) | |
1282 | 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) | |
1283 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1284 | -- idle | |
1285 | elseif(State == 'Walk')then | |
1286 | if(Hum.WalkSpeed >= 24)then | |
1287 | local wsVal = 22 / (Hum.WalkSpeed/16) | |
1288 | local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1) | |
1289 | 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) | |
1290 | 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) | |
1291 | 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) | |
1292 | NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(15),0,0),Alpha) | |
1293 | 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) | |
1294 | 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) | |
1295 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1296 | else | |
1297 | local wsVal = 8 / (Hum.WalkSpeed/8) | |
1298 | local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1) | |
1299 | 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) | |
1300 | 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) | |
1301 | 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) | |
1302 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1303 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha) | |
1304 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha) | |
1305 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1306 | end | |
1307 | elseif(State == 'Jump' or State == 'Fall')then | |
1308 | if(Walking)then | |
1309 | local Alpha = .2 | |
1310 | 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) | |
1311 | 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) | |
1312 | 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) | |
1313 | 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) | |
1314 | 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) | |
1315 | 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) | |
1316 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1317 | else | |
1318 | local Alpha = .2 | |
1319 | 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) | |
1320 | 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) | |
1321 | 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) | |
1322 | 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) | |
1323 | 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) | |
1324 | 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) | |
1325 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1326 | end | |
1327 | elseif(State == 'Paralyzed')then | |
1328 | -- paralyzed | |
1329 | elseif(State == 'Sit')then | |
1330 | -- sit | |
1331 | end | |
1332 | end | |
1333 | end |