SHOW:
|
|
- or go back to the newest paste.
1 | - | -- [[[ |
1 | + | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
2 | - | --000000[[====================================================================================\\ |
2 | + | local Player,game,owner = owner,game |
3 | - | --000000[[ deivis97 edit |
3 | + | local RealPlayer = Player |
4 | - | --000000[[====================================================================================// |
4 | + | do |
5 | - | -- [[[ |
5 | + | print("FE Compatibility code by Mokiros, Edited by StarzoZero") |
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 = 99999 | |
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 | end | |
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 | local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis} | |
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 | game.Lighting.ClockTime = 23 | |
225 | Circle = nil | |
226 | CircleParts = {} | |
227 | Equipped = false | |
228 | ||
229 | function RayCast(Position, Direction, MaxDistance, IgnoreList) | |
230 | return game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position, Direction.unit * (MaxDistance or 999.999)), IgnoreList) | |
231 | end | |
232 | Humanoid = Char:FindFirstChildOfClass("Humanoid") | |
233 | Torso = Char:FindFirstChild("Torso") | |
234 | if not Plr or not Humanoid or Humanoid.Health == 0 or not Torso then | |
235 | return | |
236 | end | |
237 | Equipped = true | |
238 | Circle = Instance.new("Model") | |
239 | Circle.Name = "Circle" | |
240 | Angle = 0 | |
241 | for i = 1, 1 do | |
242 | local CirclePart = Instance.new("Part") | |
243 | CirclePart.Name = "CirclePart" | |
244 | CirclePart.Transparency = 1 | |
245 | CirclePart.BrickColor = BrickColor.new("Really black") | |
246 | CirclePart.Material = Enum.Material.Plastic | |
247 | CirclePart.Shape = Enum.PartType.Block | |
248 | CirclePart.FormFactor = Enum.FormFactor.Custom | |
249 | CirclePart.TopSurface = Enum.SurfaceType.Smooth | |
250 | CirclePart.BottomSurface = Enum.SurfaceType.Smooth | |
251 | CirclePart.Anchored = true | |
252 | CirclePart.CanCollide = false | |
253 | CirclePart.Locked = true | |
254 | CirclePart.Size = Vector3.new(10, 0.2, 10) | |
255 | local BlockMesh = Instance.new("BlockMesh") | |
256 | BlockMesh.Scale = Vector3.new(1, (1 + (0.005 * i)), 1) | |
257 | BlockMesh.Parent = CirclePart | |
258 | CirclePart.Parent = Circle | |
259 | local Star = Instance.new("Decal", CirclePart) | |
260 | Star.Texture = "http://www.roblox.com/asset/?id=127817290" | |
261 | Star.Face = "Top" | |
262 | local Light = Instance.new("PointLight", CirclePart) | |
263 | Light.Color = Color3.new(1,0,0) | |
264 | Light.Brightness = 100 | |
265 | Light.Range = 15 | |
266 | table.insert(CircleParts, CirclePart) | |
267 | end | |
268 | Spawn(function() | |
269 | while Equipped and Humanoid.Parent and Humanoid.Health > 0 and Torso.Parent do | |
270 | if Angle == 360 then | |
271 | Angle = 0 | |
272 | end | |
273 | Angle = Angle + 0.05 | |
274 | local Hit, EndPosition = RayCast(Torso.Position, Vector3.new(0, -1, 0), (Torso.Size.Y * 6.5), {Char}) | |
275 | if Hit then | |
276 | if not Circle.Parent then | |
277 | Circle.Parent = Char | |
278 | end | |
279 | for i, v in pairs(CircleParts) do | |
280 | v.CFrame = CFrame.new(Torso.Position.X, EndPosition.Y, Torso.Position.Z) * CFrame.Angles(0, (Angle + i), 0) | |
281 | end | |
282 | else | |
283 | Circle.Parent = nil | |
284 | end | |
285 | wait() | |
286 | end | |
287 | end) | |
288 | ||
289 | function Sound(parent,id,pitch,volume,looped,effect,autoPlay) | |
290 | local Sound = IN("Sound") | |
291 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
292 | Sound.Pitch = pitch or 1 | |
293 | Sound.Volume = volume or 1 | |
294 | Sound.Looped = looped or false | |
295 | if(autoPlay)then | |
296 | coroutine.wrap(function() | |
297 | repeat wait() until Sound.IsLoaded | |
298 | Sound.Playing = autoPlay or false | |
299 | end)() | |
300 | end | |
301 | if(not looped and effect)then | |
302 | Sound.Stopped:connect(function() | |
303 | Sound.Volume = 0 | |
304 | Sound:destroy() | |
305 | end) | |
306 | elseif(effect)then | |
307 | warn("Sound can't be looped and a sound effect!") | |
308 | end | |
309 | Sound.Parent =parent or Torso | |
310 | return Sound | |
311 | end | |
312 | function Part(parent,color,material,size,cframe,anchored,cancollide) | |
313 | local part = IN("Part") | |
314 | part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0) | |
315 | part.Material = (material or Enum.Material.SmoothPlastic) | |
316 | part.TopSurface,part.BottomSurface=10,10 | |
317 | part.Size = (size or V3.N(1,1,1)) | |
318 | part.CFrame = (cframe or CF.N(0,0,0)) | |
319 | part.Anchored = (anchored or false) | |
320 | part.CanCollide = (cancollide or false) | |
321 | part.Parent = (parent or Char) | |
322 | return part | |
323 | end | |
324 | function Mesh(parent,meshtype,meshid,textid,scale,offset) | |
325 | local part = IN("SpecialMesh") | |
326 | part.MeshId = meshid or "" | |
327 | part.TextureId = textid or "" | |
328 | part.Scale = scale or V3.N(1,1,1) | |
329 | part.Offset = offset or V3.N(0,0,0) | |
330 | part.MeshType = meshtype or Enum.MeshType.Sphere | |
331 | part.Parent = parent | |
332 | return part | |
333 | end | |
334 | ||
335 | NewInstance = function(instance,parent,properties) | |
336 | local inst = Instance.new(instance,parent) | |
337 | if(properties)then | |
338 | for i,v in next, properties do | |
339 | pcall(function() inst[i] = v end) | |
340 | end | |
341 | end | |
342 | return inst; | |
343 | end | |
344 | ||
345 | ||
346 | ||
347 | --// Extended ROBLOX tables \\-- | |
348 | 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}) | |
349 | --// Customization \\-- | |
350 | ||
351 | local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this | |
352 | local Remove_Hats = false | |
353 | local Remove_Clothing = true | |
354 | local PlayerSize = 1 | |
355 | local DamageColor = BrickColor.new'Really red' | |
356 | local MusicID = 342140118 | |
357 | local WalkSpeed = 8 | |
358 | local MaxSouls = 999999 | |
359 | local MaxHealth = 9999999 | |
360 | ||
361 | ||
362 | if(_G.RefusedAnimation == nil) then _G.RefusedAnimation = false end | |
363 | ||
364 | --// Weapon and GUI creation, and Character Customization \\-- | |
365 | ||
366 | if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end | |
367 | if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end | |
368 | local Effects = IN("Folder",Char) | |
369 | Effects.Name = "Effects" | |
370 | ||
371 | Hum.MaxHealth = MaxHealth | |
372 | Hum.Health = MaxHealth | |
373 | ||
374 | local Knife = NewInstance("Part",Char,{Name='Knife',Size=V3.N(.4,8,.7),Anchored=false,CanCollide=false,Locked=true,Archivable=false,Reflectance=.01,Color=C3.N(0,0,0)}) | |
375 | local Aura = Instance.new('ParticleEmitter') | |
376 | Aura.Name = "Aura" | |
377 | Aura.Texture = "rbxassetid://456425003" | |
378 | Aura.Parent = Knife | |
379 | Aura.LightEmission = 0 | |
380 | Aura.Transparency = NumberSequence.new(0,0.6,1) | |
381 | Aura.Color = ColorSequence.new(Color3.new(255/255, 0/255, 0/255),Color3.new(0/255, 0/255, 0/255)) | |
382 | Aura.Size = NumberSequence.new(1,1.2,1.4) | |
383 | Aura.LockedToPart = false | |
384 | Aura.Lifetime = NumberRange.new(2) | |
385 | Aura.Rate = 16 | |
386 | Aura.Speed = NumberRange.new(3) | |
387 | Aura.EmissionDirection = "Top" | |
388 | local KnifeMesh = Mesh(Knife,Enum.MeshType.FileMesh,"rbxassetid://474005283","rbxassetid://1362831267",V3.N(0.006,0.006,0.006),V3.N(0,2,0)) | |
389 | ||
390 | ||
391 | local KTrail = NewInstance("Trail",Knife,{ | |
392 | Attachment0=NewInstance("Attachment",Knife,{Position=V3.N(0,0.1,0)}), | |
393 | Attachment1=NewInstance("Attachment",Knife,{Position=V3.N(0,5.3,0)}), | |
394 | Color=CS(C3.N(255,0,0),C3.N(0,255,255)), | |
395 | Enabled=true, | |
396 | Transparency=NumberSequence.new(0,1), | |
397 | Lifetime=1.25, | |
398 | }) | |
399 | local Hair = Part(Char,C3.N(0,1,1),Enum.Material.SmoothPlastic,V3.N(1,1,1),CF.N(),false,false) | |
400 | local HairMesh = Mesh(Hair,Enum.MeshType.FileMesh,"rbxassetid://62246019","rbxassetid://60299407",V3.N(1.05,1.05,1.05),V3.N(0, 0, 0.2)) | |
401 | ||
402 | NewInstance("PointLight",Knife,{Color=C3.N(1,0,0),Range=10,Brightness=3}) | |
403 | ||
404 | ||
405 | Hum.DisplayDistanceType = 'None' | |
406 | ||
407 | function chatfunc(text) | |
408 | local chat = coroutine.wrap(function() | |
409 | if Char:FindFirstChild("TalkingBillBoard")~= nil then | |
410 | Char:FindFirstChild("TalkingBillBoard"):destroy() | |
411 | end | |
412 | local Bill = Instance.new("BillboardGui",Char) | |
413 | Bill.Size = UDim2.new(0,100,0,40) | |
414 | Bill.StudsOffset = Vector3.new(0,3,0) | |
415 | Bill.Adornee = Char.Head | |
416 | Bill.Name = "TalkingBillBoard" | |
417 | local Hehe = Instance.new("TextLabel",Bill) | |
418 | Hehe.BackgroundTransparency = 1 | |
419 | Hehe.BorderSizePixel = 0 | |
420 | Hehe.Text = "" | |
421 | Hehe.Font = "Antique" | |
422 | Hehe.TextSize = 40 | |
423 | Hehe.TextStrokeTransparency = 0 | |
424 | Hehe.Size = UDim2.new(1,0,0.5,0) | |
425 | coroutine.resume(coroutine.create(function() | |
426 | while Hehe ~= nil do | |
427 | swait() | |
428 | Hehe.Position = UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5)) | |
429 | Hehe.Rotation = math.random(-5,5) | |
430 | Hehe.TextColor3 = Color3.new(math.random(0, 255)/255,0,0) | |
431 | Hehe.TextStrokeColor3 = Color3.new(math.random(0, 255)/255,0,0) | |
432 | end | |
433 | end)) | |
434 | for i = 1,string.len(text),1 do | |
435 | swait() | |
436 | Hehe.Text = string.sub(text,1,i) | |
437 | end | |
438 | swait(90)--Re[math.random(1, 93)] | |
439 | for i = 0, 1, .025 do | |
440 | swait() | |
441 | Bill.ExtentsOffset = Vector3.new(math.random(-i, i), math.random(-i, i), math.random(-i, i)) | |
442 | Hehe.TextStrokeTransparency = i | |
443 | Hehe.TextTransparency = i | |
444 | end | |
445 | Bill:Destroy() | |
446 | end) | |
447 | chat() | |
448 | end | |
449 | ||
450 | function onChatted(msg) | |
451 | chatfunc(msg) | |
452 | end | |
453 | ||
454 | Plr.Chatted:connect(onChatted) | |
455 | ||
456 | ||
457 | IN("Shirt",Char) | |
458 | IN("Pants",Char) | |
459 | ||
460 | Hum.WalkSpeed = WalkSpeed | |
461 | if(PlayerSize ~= 1)then | |
462 | for _,v in next, Char:GetDescendats() do | |
463 | if(v:IsA'BasePart')then | |
464 | v.Size = v.Size * PlayerSize | |
465 | end | |
466 | end | |
467 | end | |
468 | ||
469 | ||
470 | for i = 1, 35 do | |
471 | local FACE = Part(Char,C3.N(0,0,0),Enum.Material.Neon,V3.N(1.01,.5,1.01),CF.N(),false,false) | |
472 | FACE.Transparency = 0+(i-1)/35.2 | |
473 | FACE.Name = 'ShadowFace' | |
474 | Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE | |
475 | NewInstance("Weld",Head,{Part0=Head,Part1=FACE,C0=CF.N(0,.35-(i-1)/75,0)}) | |
476 | --CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0)) | |
477 | end | |
478 | ||
479 | local LEye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false) | |
480 | local LEyeM = Mesh(LEye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N()) | |
481 | local LEyeW = NewInstance("Weld",LEye,{Part0=Head,Part1=LEye,C0=CF.N(-.2,.2,-.49)}) | |
482 | local Aura1 = Instance.new('ParticleEmitter') | |
483 | Aura1.Name = "Aura" | |
484 | Aura1.Texture = "rbxassetid://141116476" | |
485 | Aura1.Parent = LEye | |
486 | Aura1.LightEmission = 1 | |
487 | Aura1.Transparency = NumberSequence.new(0,0.6,1) | |
488 | Aura1.Color = ColorSequence.new(Color3.new(255/255, 0/255, 0/255),Color3.new(0/255, 255/255, 255/255)) | |
489 | Aura1.Size = NumberSequence.new(0.4,0.3,0.1) | |
490 | Aura1.LockedToPart = false | |
491 | Aura1.Lifetime = NumberRange.new(1) | |
492 | Aura1.Rate = 99 | |
493 | Aura1.Speed = NumberRange.new(1) | |
494 | Aura1.EmissionDirection = "Left" | |
495 | ||
496 | local REye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false) | |
497 | local REyeM = Mesh(REye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N()) | |
498 | local REyeW = NewInstance("Weld",REye,{Part0=Head,Part1=REye,C0=CF.N(.2,.2,-.49)}) | |
499 | local Aura11 = Instance.new('ParticleEmitter') | |
500 | Aura11.Name = "Aura" | |
501 | Aura11.Texture = "rbxassetid://141116476" | |
502 | Aura11.Parent = REye | |
503 | Aura11.LightEmission = 1 | |
504 | Aura11.Transparency = NumberSequence.new(0,0.6,1) | |
505 | Aura11.Color = ColorSequence.new(Color3.new(255/255, 0/255, 0/255),Color3.new(0/255, 255/255, 255/255)) | |
506 | Aura11.Size = NumberSequence.new(0.4,0.3,0.1) | |
507 | Aura11.LockedToPart = false | |
508 | Aura11.Lifetime = NumberRange.new(1) | |
509 | Aura11.Rate = 99 | |
510 | Aura11.Speed = NumberRange.new(1) | |
511 | Aura11.EmissionDirection = "Right" | |
512 | ||
513 | ||
514 | pcall(function() | |
515 | Char.ReaperShadowHead:destroy() | |
516 | end) | |
517 | ||
518 | ||
519 | local Music = Sound(Torso,MusicID,1,3,true,false,true) | |
520 | Music.Name = 'Music' | |
521 | ||
522 | --// Stop animations \\-- | |
523 | for _,v in next, Hum:GetPlayingAnimationTracks() do | |
524 | v:Stop(); | |
525 | end | |
526 | ||
527 | pcall(game.Destroy,Char:FindFirstChild'Animate') | |
528 | pcall(game.Destroy,Hum:FindFirstChild'Animator') | |
529 | ||
530 | --// Joints \\-- | |
531 | ||
532 | 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)}) | |
533 | 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)}) | |
534 | local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)}) | |
535 | local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)}) | |
536 | local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)}) | |
537 | local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso}) | |
538 | local HW = NewInstance('Motor',Char,{Part0=RArm,Part1=Knife,C0=CF.N(0,-1,-1)*CF.A(M.R(-90),0,0)}) | |
539 | local HW2 = NewInstance('Motor',Char,{Part0=Head,Part1=Hair,C0=CF.N(0,.25,0)}) | |
540 | ||
541 | local LSC0 = LS.C0 | |
542 | local RSC0 = RS.C0 | |
543 | local NKC0 = NK.C0 | |
544 | local LHC0 = LH.C0 | |
545 | local RHC0 = RH.C0 | |
546 | local RJC0 = RJ.C0 | |
547 | ||
548 | --// Artificial HB \\-- | |
549 | ||
550 | local ArtificialHB = IN("BindableEvent", script) | |
551 | ArtificialHB.Name = "Heartbeat" | |
552 | ||
553 | script:WaitForChild("Heartbeat") | |
554 | ||
555 | local tf = 0 | |
556 | local allowframeloss = false | |
557 | local tossremainder = false | |
558 | local lastframe = tick() | |
559 | local frame = 1/Frame_Speed | |
560 | ArtificialHB:Fire() | |
561 | ||
562 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
563 | tf = tf + s | |
564 | if tf >= frame then | |
565 | if allowframeloss then | |
566 | script.Heartbeat:Fire() | |
567 | lastframe = tick() | |
568 | else | |
569 | for i = 1, math.floor(tf / frame) do | |
570 | ArtificialHB:Fire() | |
571 | end | |
572 | lastframe = tick() | |
573 | end | |
574 | if tossremainder then | |
575 | tf = 0 | |
576 | else | |
577 | tf = tf - frame * math.floor(tf / frame) | |
578 | end | |
579 | end | |
580 | end) | |
581 | ||
582 | function swait(num) | |
583 | if num == 0 or num == nil then | |
584 | ArtificialHB.Event:wait() | |
585 | else | |
586 | for i = 0, num do | |
587 | ArtificialHB.Event:wait() | |
588 | end | |
589 | end | |
590 | end | |
591 | ||
592 | ||
593 | --// Effect Function(s) \\-- | |
594 | ||
595 | function Bezier(startpos, pos2, pos3, endpos, t) | |
596 | local A = startpos:lerp(pos2, t) | |
597 | local B = pos2:lerp(pos3, t) | |
598 | local C = pos3:lerp(endpos, t) | |
599 | local lerp1 = A:lerp(B, t) | |
600 | local lerp2 = B:lerp(C, t) | |
601 | local cubic = lerp1:lerp(lerp2, t) | |
602 | return cubic | |
603 | end | |
604 | ||
605 | function Tween(obj,props,time,easing,direction,repeats,backwards) | |
606 | local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false) | |
607 | local tween = S.TweenService:Create(obj, info, props) | |
608 | ||
609 | tween:Play() | |
610 | end | |
611 | ||
612 | local FXTable = {} | |
613 | ||
614 | coroutine.resume(coroutine.create(function() | |
615 | while true do | |
616 | for i = 1, #FXTable do | |
617 | local data = FXTable[i] | |
618 | if(data)then | |
619 | local Frame = data.Frame | |
620 | local FX = data.Effect or 'ResizeAndFade' | |
621 | local Parent = data.Parent or Effects | |
622 | local Color = data.Color or C3.N(0,0,0) | |
623 | local Size = data.Size or V3.N(1,1,1) | |
624 | local MoveDir = data.MoveDirection or nil | |
625 | local MeshData = data.Mesh or nil | |
626 | local SndData = data.Sound or nil | |
627 | local Frames = data.Frames or 45 | |
628 | local CFra = data.CFrame or Torso.CFrame | |
629 | local Settings = data.FXSettings or {} | |
630 | local Prt,Msh,Snd = data.Part,data.Mesh,data.Sound | |
631 | local grow = data.Grow | |
632 | ||
633 | local MoveSpeed = nil; | |
634 | if(MoveDir)then | |
635 | MoveSpeed = (CFra.p - MoveDir).magnitude/Frames | |
636 | end | |
637 | if(FX ~= 'Arc')then | |
638 | Frame = Frame + 1 | |
639 | if(FX == "Fade")then | |
640 | Prt.Transparency = (Frame/Frames) | |
641 | elseif(FX == "Resize")then | |
642 | if(not Settings.EndSize)then | |
643 | Settings.EndSize = V3.N(0,0,0) | |
644 | end | |
645 | if(Settings.EndIsIncrement)then | |
646 | if(Msh)then | |
647 | Msh.Scale = Msh.Scale + Settings.EndSize | |
648 | else | |
649 | Prt.Size = Prt.Size + Settings.EndSize | |
650 | end | |
651 | else | |
652 | if(Msh)then | |
653 | Msh.Scale = Msh.Scale - grow/Frames | |
654 | else | |
655 | Prt.Size = Prt.Size - grow/Frames | |
656 | end | |
657 | end | |
658 | elseif(FX == "ResizeAndFade")then | |
659 | if(not Settings.EndSize)then | |
660 | Settings.EndSize = V3.N(0,0,0) | |
661 | end | |
662 | if(Settings.EndIsIncrement)then | |
663 | if(Msh)then | |
664 | Msh.Scale = Msh.Scale + Settings.EndSize | |
665 | else | |
666 | Prt.Size = Prt.Size + Settings.EndSize | |
667 | end | |
668 | else | |
669 | if(Msh)then | |
670 | Msh.Scale = Msh.Scale - grow/Frames | |
671 | else | |
672 | Prt.Size = Prt.Size - grow/Frames | |
673 | end | |
674 | end | |
675 | Prt.Transparency = (Frame/Frames) | |
676 | end | |
677 | if(Settings.RandomizeCFrame)then | |
678 | Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360)) | |
679 | end | |
680 | if(MoveDir and MoveSpeed)then | |
681 | local Orientation = Prt.Orientation | |
682 | Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed) | |
683 | Prt.Orientation = Orientation | |
684 | end | |
685 | if(Prt.Transparency >= 1 or Frame >= Frames)then | |
686 | Prt:destroy() | |
687 | table.remove(FXTable,i) | |
688 | else | |
689 | data.Frame = Frame | |
690 | end | |
691 | else | |
692 | local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End | |
693 | if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end | |
694 | if(start and endP)then | |
695 | local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
696 | local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
697 | Frame = Frame + (Settings.Speed or 0.01) | |
698 | if(Settings.Home)then | |
699 | endP = Settings.Home.CFrame | |
700 | end | |
701 | Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame) | |
702 | if(Prt.Transparency >= 1 or Frame >= Frames)then | |
703 | if(Settings.RemoveOnGoal)then | |
704 | Prt:destroy() | |
705 | end | |
706 | end | |
707 | else | |
708 | Prt:destroy() | |
709 | end | |
710 | end | |
711 | end | |
712 | end | |
713 | swait() | |
714 | end | |
715 | end)) | |
716 | ||
717 | function Effect(data) | |
718 | local FX = data.Effect or 'ResizeAndFade' | |
719 | local Parent = data.Parent or Effects | |
720 | local Color = data.Color or C3.N(0,0,0) | |
721 | local Size = data.Size or V3.N(1,1,1) | |
722 | local MoveDir = data.MoveDirection or nil | |
723 | local MeshData = data.Mesh or nil | |
724 | local SndData = data.Sound or nil | |
725 | local Frames = data.Frames or 45 | |
726 | local Manual = data.Manual or nil | |
727 | local Material = data.Material or nil | |
728 | local CFra = data.CFrame or Torso.CFrame | |
729 | local Settings = data.FXSettings or {} | |
730 | local Shape = data.Shape or Enum.PartType.Block | |
731 | local Snd,Prt,Msh; | |
732 | coroutine.wrap(function() | |
733 | if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then | |
734 | Prt = Manual | |
735 | else | |
736 | Prt = Part(Parent,Color,Material,Size,CFra,true,false) | |
737 | Prt.Shape = Shape | |
738 | end | |
739 | if(typeof(MeshData) == 'table')then | |
740 | Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset) | |
741 | elseif(typeof(MeshData) == 'Instance')then | |
742 | Msh = MeshData:Clone() | |
743 | Msh.Parent = Prt | |
744 | elseif(Shape == Enum.PartType.Block)then | |
745 | Msh = Mesh(Prt,Enum.MeshType.Brick) | |
746 | end | |
747 | if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then | |
748 | Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true) | |
749 | end | |
750 | if(Snd)then | |
751 | repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0 | |
752 | Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch | |
753 | end | |
754 | Size = (Msh and Msh.Scale or Size) | |
755 | local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2) | |
756 | ||
757 | local MoveSpeed = nil; | |
758 | if(MoveDir)then | |
759 | MoveSpeed = (CFra.p - MoveDir).magnitude/Frames | |
760 | end | |
761 | if(FX ~= 'Arc')then | |
762 | for Frame = 1, Frames do | |
763 | if(FX == "Fade")then | |
764 | Prt.Transparency = (Frame/Frames) | |
765 | elseif(FX == "Resize")then | |
766 | if(not Settings.EndSize)then | |
767 | Settings.EndSize = V3.N(0,0,0) | |
768 | end | |
769 | if(Settings.EndIsIncrement)then | |
770 | if(Msh)then | |
771 | Msh.Scale = Msh.Scale + Settings.EndSize | |
772 | else | |
773 | Prt.Size = Prt.Size + Settings.EndSize | |
774 | end | |
775 | else | |
776 | if(Msh)then | |
777 | Msh.Scale = Msh.Scale - grow/Frames | |
778 | else | |
779 | Prt.Size = Prt.Size - grow/Frames | |
780 | end | |
781 | end | |
782 | elseif(FX == "ResizeAndFade")then | |
783 | if(not Settings.EndSize)then | |
784 | Settings.EndSize = V3.N(0,0,0) | |
785 | end | |
786 | if(Settings.EndIsIncrement)then | |
787 | if(Msh)then | |
788 | Msh.Scale = Msh.Scale + Settings.EndSize | |
789 | else | |
790 | Prt.Size = Prt.Size + Settings.EndSize | |
791 | end | |
792 | else | |
793 | if(Msh)then | |
794 | Msh.Scale = Msh.Scale - grow/Frames | |
795 | else | |
796 | Prt.Size = Prt.Size - grow/Frames | |
797 | end | |
798 | end | |
799 | Prt.Transparency = (Frame/Frames) | |
800 | end | |
801 | if(Settings.RandomizeCFrame)then | |
802 | Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360)) | |
803 | end | |
804 | if(MoveDir and MoveSpeed)then | |
805 | local Orientation = Prt.Orientation | |
806 | Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed) | |
807 | Prt.Orientation = Orientation | |
808 | end | |
809 | swait() | |
810 | end | |
811 | Prt:destroy() | |
812 | else | |
813 | local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End | |
814 | if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end | |
815 | if(start and endP)then | |
816 | local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
817 | local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
818 | for Frame = 0, 1, (Settings.Speed or 0.01) do | |
819 | if(Settings.Home)then | |
820 | endP = Settings.Home.CFrame | |
821 | end | |
822 | Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame) | |
823 | end | |
824 | if(Settings.RemoveOnGoal)then | |
825 | Prt:destroy() | |
826 | end | |
827 | else | |
828 | Prt:destroy() | |
829 | assert(start,"You need a start position!") | |
830 | assert(endP,"You need a start position!") | |
831 | end | |
832 | end | |
833 | end)() | |
834 | return Prt,Msh,Snd | |
835 | end | |
836 | ||
837 | ||
838 | function SoulSteal(whom,human) | |
839 | local torso = (whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart' or whom:FindFirstChild'Torso') | |
840 | local succ, health, alive = pcall(function() return whom:FindFirstChildOfClass'Humanoid'.Health, whom:FindFirstChildOfClass'Humanoid'.Health > 0 end) | |
841 | if(torso and torso:IsA'BasePart' and alive == true)then | |
842 | whom:FindFirstChildOfClass'Humanoid'.Health = 0 | |
843 | whom:BreakJoints() | |
844 | local Model = IN("Model",Effects) | |
845 | warn('Soul stolen from '..whom.Name) | |
846 | Model.Name = whom.Name.."'s Soul" | |
847 | local Soul = Part(Model,(human and BrickColor.new'Really red' or BrickColor.new(C3.N(0,1,1))),'Glass',V3.N(1,1,1),torso.CFrame,true,false) | |
848 | Soul.CanCollide=false | |
849 | Mesh(Soul,Enum.MeshType.Sphere) | |
850 | Soul.Name = 'Head' | |
851 | if(whom.Name == 'CKbackup')then | |
852 | Soul.Color = C3.N(0,1,1) | |
853 | 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)}) | |
854 | end | |
855 | local Hoom = NewInstance("Humanoid",Model,{MaxHealth=(health <= 10000 and health/2 or 10000),Health=(health <= 10000 and health/2 or 10000)}) | |
856 | local AT0 = NewInstance("Attachment",Soul,{Position=V3.N(0,.5,0)}) | |
857 | local AT1 = NewInstance("Attachment",Soul,{Position=V3.N(0,-.5,0)}) | |
858 | 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}) | |
859 | NewInstance("PointLight",Soul,{Color=Soul.Color,Range=10,Brightness=(human and 3 or .5)}) | |
860 | ||
861 | local turdso = Soul:Clone() | |
862 | turdso.Name = "Torso" | |
863 | turdso.CanCollide = false | |
864 | turdso.Anchored = true | |
865 | turdso.CFrame = Soul.CFrame | |
866 | turdso.Parent = Model | |
867 | turdso.Size = V3.N() | |
868 | turdso.Transparency=1 | |
869 | local Distance = math.huge | |
870 | repeat | |
871 | Soul.CFrame = CF.N(Soul.Position,Torso.Position)*CF.N(0,0,-1) | |
872 | turdso.CFrame = Soul.CFrame | |
873 | Distance = (Soul.CFrame.p-Torso.CFrame.p).magnitude | |
874 | swait() | |
875 | until Hoom.Health <= 0 or not Soul.Parent or Distance <= 1.2 | |
876 | if(Soul.Parent and Hoom.Health > 0)then | |
877 | Model:destroy() | |
878 | Effect{ | |
879 | Effect="ResizeAndFade", | |
880 | Mesh={Enum.MeshType.Sphere}, | |
881 | Color = Soul.Color, | |
882 | CFrame=Torso.CFrame, | |
883 | Size=V3.N(3,3,3), | |
884 | Material=Enum.Material.Neon, | |
885 | Sound={SoundId=444667859,Pitch=1,Volume=2.5}, | |
886 | FXSettings={ | |
887 | EndSize=V3.N(6,6,6), | |
888 | } | |
889 | } | |
890 | Souls = Souls + (human and 1 or .1) | |
891 | warn("Souls: "..Souls) | |
892 | MaxHealth = MaxHealth + Hoom.Health | |
893 | Hum.Health = Hum.Health + Hoom.Health | |
894 | for i = 1, 5 do | |
895 | Effect{ | |
896 | Effect="Fade", | |
897 | Color = Soul.Color, | |
898 | MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p | |
899 | } | |
900 | end | |
901 | else | |
902 | ||
903 | warn("Soul destroyed!") | |
904 | for i = 1, 5 do | |
905 | Effect{ | |
906 | Effect="Fade", | |
907 | Color = Soul.Color, | |
908 | CFrame=Soul.CFrame, | |
909 | MoveDirection = (Soul.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p | |
910 | } | |
911 | end | |
912 | Effect{ | |
913 | Effect="ResizeAndFade", | |
914 | Mesh={Enum.MeshType.Sphere}, | |
915 | Sound={SoundId=444667859,Pitch=1,Volume=5}, | |
916 | Color = Soul.Color, | |
917 | CFrame=Soul.CFrame, | |
918 | Size=V3.N(3,3,3), | |
919 | Material=Enum.Material.Neon, | |
920 | FXSettings={ | |
921 | EndSize=V3.N(6,6,6), | |
922 | } | |
923 | } | |
924 | Model:destroy() | |
925 | end | |
926 | end | |
927 | end | |
928 | ||
929 | --// Other Functions \\ -- | |
930 | ||
931 | function getRegion(point,range,ignore) | |
932 | return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100) | |
933 | end | |
934 | ||
935 | function clerp(startCF,endCF,alpha) | |
936 | return startCF:lerp(endCF, alpha) | |
937 | end | |
938 | ||
939 | function GetTorso(char) | |
940 | return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart' | |
941 | end | |
942 | ||
943 | function ShowDamage(Pos, Text, Time, Color) | |
944 | coroutine.wrap(function() | |
945 | local Rate = (1 / Frame_Speed) | |
946 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
947 | local Text = (Text or "") | |
948 | local Time = (Time or 2) | |
949 | local Color = (Color or Color3.new(1, 0, 1)) | |
950 | local EffectPart = NewInstance("Part",Effects,{ | |
951 | Material=Enum.Material.SmoothPlastic, | |
952 | Reflectance = 0, | |
953 | Transparency = 1, | |
954 | BrickColor = BrickColor.new(Color), | |
955 | Name = "Effect", | |
956 | Size = Vector3.new(0,0,0), | |
957 | Anchored = true, | |
958 | CFrame = CF.N(Pos) | |
959 | }) | |
960 | local BillboardGui = NewInstance("BillboardGui",EffectPart,{ | |
961 | Size = UDim2.new(1.25, 0, 1.25, 0), | |
962 | Adornee = EffectPart, | |
963 | }) | |
964 | local TextLabel = NewInstance("TextLabel",BillboardGui,{ | |
965 | BackgroundTransparency = 1, | |
966 | Size = UDim2.new(1, 0, 1, 0), | |
967 | Text = Text, | |
968 | Font = "Arcade", | |
969 | TextColor3 = Color, | |
970 | TextStrokeColor3 = Color3.new(0,0,0), | |
971 | TextStrokeTransparency=0, | |
972 | TextScaled = true, | |
973 | }) | |
974 | S.Debris:AddItem(EffectPart, (Time)) | |
975 | EffectPart.Parent = workspace | |
976 | delay(0, function() | |
977 | Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out) | |
978 | local Frames = (Time / Rate) | |
979 | for Frame = 1, Frames do | |
980 | swait() | |
981 | local Percent = (Frame / Frames) | |
982 | TextLabel.TextTransparency = Percent | |
983 | TextLabel.TextStrokeTransparency = Percent | |
984 | end | |
985 | if EffectPart and EffectPart.Parent then | |
986 | EffectPart:Destroy() | |
987 | end | |
988 | end) end)() | |
989 | end | |
990 | ||
991 | function Kill(whom) | |
992 | if(whom.Name ~= 'Nebula_Zorua')then | |
993 | local isPlr = Plrs:GetPlayerFromCharacter(whom) ~= nil | |
994 | coroutine.wrap(SoulSteal)(whom,isPlr) | |
995 | for _,v in next, whom:children() do | |
996 | if(v:IsA'BasePart')then | |
997 | v.Parent = Effects | |
998 | v:ClearAllChildren() | |
999 | v.Anchored = true | |
1000 | v.CanCollide = false | |
1001 | v.Transparency = 1 | |
1002 | local dust = NewInstance("ParticleEmitter",v,{ | |
1003 | Color = ColorSequence.new(C3.N(0,1,1)), | |
1004 | LightEmission=0, | |
1005 | LightInfluence=1, | |
1006 | Size=NumberSequence.new{NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(1,0,0)}, | |
1007 | Texture="rbxassetid://284205403", | |
1008 | Transparency=NumberSequence.new{NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)}, | |
1009 | Lifetime = NumberRange.new(1), | |
1010 | Rate=150, | |
1011 | Acceleration = V3.N(0,10,0), | |
1012 | Speed = NumberRange.new(5), | |
1013 | Enabled = true | |
1014 | }) | |
1015 | delay(1, function() | |
1016 | dust.Enabled = false | |
1017 | S.Debris:AddItem(v,2) | |
1018 | end) | |
1019 | end | |
1020 | end | |
1021 | else | |
1022 | warn"nope. nawt happenin'" | |
1023 | end | |
1024 | end | |
1025 | ||
1026 | function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult) | |
1027 | if(who)then | |
1028 | local hum = who:FindFirstChildOfClass'Humanoid' | |
1029 | local Damage = M.RNG(minDam,maxDam) | |
1030 | local canHit = true | |
1031 | if(hum)then | |
1032 | for _, p in pairs(Hit) do | |
1033 | if p[1] == hum then | |
1034 | if(time() - p[2] < 0.4) then | |
1035 | canHit = false | |
1036 | else | |
1037 | Hit[_] = nil | |
1038 | end | |
1039 | end | |
1040 | end | |
1041 | if(canHit)then | |
1042 | table.insert(Hit,{hum,time()}) | |
1043 | if(GetTorso(who))then | |
1044 | Sound(GetTorso(who),406913243,1,10,false,true,true) | |
1045 | end | |
1046 | if(hum.Health >= math.huge)then | |
1047 | Kill(who) | |
1048 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
1049 | 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) | |
1050 | end | |
1051 | else | |
1052 | local player = S.Players:GetPlayerFromCharacter(who) | |
1053 | if(Type == "Fire")then | |
1054 | --idk.. | |
1055 | else | |
1056 | local c = Instance.new("ObjectValue",hum) | |
1057 | c.Name = "creator" | |
1058 | c.Value = Plr | |
1059 | game:service'Debris':AddItem(c,0.35) | |
1060 | local Crit = false | |
1061 | if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then | |
1062 | Crit = true | |
1063 | Damage = Damage*(critMult or 2) | |
1064 | end | |
1065 | Damage = Damage*((Souls/5)+1) | |
1066 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
1067 | 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)) | |
1068 | end | |
1069 | ||
1070 | if(hum.Health - Damage <= 0)then | |
1071 | Kill(who) | |
1072 | else | |
1073 | hum.Health = hum.Health - Damage | |
1074 | if(Type == 'Knockback' and GetTorso(who))then | |
1075 | local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit | |
1076 | local body = NewInstance('BodyVelocity',GetTorso(who),{ | |
1077 | P = 500, | |
1078 | maxForce = V3.N(math.huge,0,math.huge), | |
1079 | velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05 | |
1080 | }) | |
1081 | game:service'Debris':AddItem(body,.5) | |
1082 | elseif(Type == "Electric")then | |
1083 | if(M.RNG(1,100) >= critChance)then | |
1084 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
1085 | 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) | |
1086 | end | |
1087 | local asd = hum.WalkSpeed/2 | |
1088 | hum.WalkSpeed = asd | |
1089 | local paralyzed = true | |
1090 | coroutine.wrap(function() | |
1091 | while paralyzed do | |
1092 | swait(25) | |
1093 | if(M.RNG(1,25) == 1)then | |
1094 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
1095 | 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) | |
1096 | end | |
1097 | hum.PlatformStand = true | |
1098 | end | |
1099 | end | |
1100 | end)() | |
1101 | delay(4, function() | |
1102 | paralyzed = false | |
1103 | hum.WalkSpeed = hum.WalkSpeed + asd | |
1104 | end) | |
1105 | end | |
1106 | ||
1107 | elseif(Type == 'Knockdown' and GetTorso(who))then | |
1108 | local rek = GetTorso(who) | |
1109 | hum.PlatformStand = true | |
1110 | delay(1,function() | |
1111 | hum.PlatformStand = false | |
1112 | end) | |
1113 | local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit | |
1114 | local bodvol = NewInstance("BodyVelocity",rek,{ | |
1115 | velocity = angle * Knock, | |
1116 | P = 5000, | |
1117 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
1118 | }) | |
1119 | local rl = NewInstance("BodyAngularVelocity",rek,{ | |
1120 | P = 3000, | |
1121 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
1122 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
1123 | }) | |
1124 | game:GetService("Debris"):AddItem(bodvol, .5) | |
1125 | game:GetService("Debris"):AddItem(rl, .5) | |
1126 | end | |
1127 | end | |
1128 | end | |
1129 | end | |
1130 | end | |
1131 | end | |
1132 | end | |
1133 | end | |
1134 | ||
1135 | ||
1136 | function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult) | |
1137 | for _,v in next, getRegion(where,range,{Char}) do | |
1138 | if(v.Name ~= 'Nebula_Zorua')then | |
1139 | if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then | |
1140 | DealDamage(v.Parent,minDam,maxDam,Knock,Type,critChance,critMult) | |
1141 | end | |
1142 | end | |
1143 | end | |
1144 | end | |
1145 | ||
1146 | function AOEKill(where,range) | |
1147 | local sound = Sound(Char,752783199,1,999,false,true,false) | |
1148 | chatfunc("Your soul is mine...") | |
1149 | for _,v in next, getRegion(where,range,{Char,Effects}) do | |
1150 | local succ,alive = pcall(function() return v.Parent:FindFirstChildOfClass'Humanoid'.Health > 0 end) | |
1151 | if(v.Name ~= 'deivis97')then | |
1152 | if(v.Parent and alive == true)then | |
1153 | coroutine.wrap(Kill)(v.Parent) | |
1154 | sound:Play() | |
1155 | end | |
1156 | end | |
1157 | end | |
1158 | end | |
1159 | ||
1160 | function AOEHeal(where,range,amount) | |
1161 | local healed = {} | |
1162 | for _,v in next, getRegion(where,range,{Char}) do | |
1163 | local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil) | |
1164 | if(hum and not healed[hum])then | |
1165 | hum.Health = hum.Health + amount | |
1166 | if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then | |
1167 | 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) | |
1168 | end | |
1169 | end | |
1170 | end | |
1171 | end | |
1172 | ||
1173 | ||
1174 | --// Attack Functions \\-- | |
1175 | ||
1176 | ||
1177 | function Slash() | |
1178 | Attack = true | |
1179 | NeutralAnims = false | |
1180 | local sound = Sound(Knife,536642316,1,6,false,true,false) | |
1181 | for i = 0, 2, 0.1 do | |
1182 | swait() | |
1183 | local Alpha = .2 | |
1184 | 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) | |
1185 | 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) | |
1186 | 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) | |
1187 | 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) | |
1188 | 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) | |
1189 | 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) | |
1190 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1191 | end | |
1192 | KTrail.Enabled = true | |
1193 | sound:Play() | |
1194 | for i = 0, 2.5, 0.1 do | |
1195 | swait() | |
1196 | AOEDamage(Knife.CFrame.p,1,999999,999999,0,"Normal",0,1) | |
1197 | local Alpha = .25 | |
1198 | 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) | |
1199 | 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) | |
1200 | 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) | |
1201 | 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) | |
1202 | 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) | |
1203 | 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) | |
1204 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1205 | end | |
1206 | KTrail.Enabled = true | |
1207 | Attack = false | |
1208 | NeutralAnims = true | |
1209 | end | |
1210 | ||
1211 | Mouse.Button1Down:connect(function() | |
1212 | if(Attack)then return end | |
1213 | Slash() | |
1214 | end) | |
1215 | ||
1216 | Mouse.KeyDown:connect(function(k) | |
1217 | if(Attack)then return end | |
1218 | if(k == 'z')then AOEKill(Root.CFrame.p,1900) end | |
1219 | if(k == 'r')then WalkSpeed = (WalkSpeed == 8 and 200 or 8) end | |
1220 | if(k == 'e')then WalkSpeed = (WalkSpeed == 8 and 60 or 8) end | |
1221 | if(k == 'q')then WalkSpeed = (WalkSpeed == 8 and 32 or 8) end | |
1222 | if(k == 't')then Sound(Char,654422659,1,90) Root.CFrame = CFrame.new(CFrame.new(Mouse.Hit.p)*CFrame.new(0,2.8,0).p,Root.Position) end | |
1223 | end) | |
1224 | ||
1225 | ||
1226 | local BODY = {} | |
1227 | ||
1228 | for _, c in pairs(Char:GetDescendants()) do | |
1229 | if c:IsA("BasePart") and c.Name ~= "Handle" then | |
1230 | if c ~= Root and c ~= Torso and c ~= Head and c ~= RArm and c ~= LArm and c ~= RLeg and c ~= LLeg then | |
1231 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
1232 | end | |
1233 | table.insert(BODY,{c,c.Parent,c.Material,c.Color,c.Transparency}) | |
1234 | elseif c:IsA("JointInstance") then | |
1235 | table.insert(BODY,{c,c.Parent,nil,nil,nil}) | |
1236 | end | |
1237 | end | |
1238 | ||
1239 | for e = 1, #BODY do | |
1240 | if BODY[e] ~= nil then | |
1241 | local STUFF = BODY[e] | |
1242 | local PART = STUFF[1] | |
1243 | local PARENT = STUFF[2] | |
1244 | local MATERIAL = STUFF[3] | |
1245 | local COLOR = STUFF[4] | |
1246 | local TRANSPARENCY = STUFF[5] | |
1247 | if PART.ClassName == "Part" and PART ~= Root then | |
1248 | end | |
1249 | PART.AncestryChanged:Connect(function() | |
1250 | PART.Parent = PARENT | |
1251 | end) | |
1252 | end | |
1253 | end | |
1254 | ||
1255 | function refit() | |
1256 | Char.Parent = workspace | |
1257 | for e = 1, #BODY do | |
1258 | if BODY[e] ~= nil then | |
1259 | local STUFF = BODY[e] | |
1260 | local PART = STUFF[1] | |
1261 | local PARENT = STUFF[2] | |
1262 | local MATERIAL = STUFF[3] | |
1263 | local COLOR = STUFF[4] | |
1264 | local TRANSPARENCY = STUFF[5] | |
1265 | if PART.ClassName == "Part" and PART ~= Root then | |
1266 | end | |
1267 | if PART.Parent ~= PARENT then | |
1268 | Humanoid:remove() | |
1269 | PART.Parent = PARENT | |
1270 | Humanoid = Instance.new("Humanoid",Char) | |
1271 | end | |
1272 | end | |
1273 | end | |
1274 | Humanoid.Died:connect(function() | |
1275 | refit() | |
1276 | end) | |
1277 | LEye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false) | |
1278 | LEyeM = Mesh(LEye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N()) | |
1279 | LEyeW = NewInstance("Weld",LEye,{Part0=Head,Part1=LEye,C0=CF.N(-.2,.2,-.49)}) | |
1280 | ||
1281 | REye = Part(Char,C3.N(1,0,0),Enum.Material.Neon,V3.N(.15,.25,.2),CF.N(),false,false) | |
1282 | REyeM = Mesh(REye,Enum.MeshType.Sphere,"","",V3.N(1,1,1),V3.N()) | |
1283 | REyeW = NewInstance("Weld",REye,{Part0=Head,Part1=REye,C0=CF.N(.2,.2,-.49)}) | |
1284 | for i = 1, 35 do | |
1285 | local FACE = Part(Char,C3.N(0,0,0),Enum.Material.Neon,V3.N(1.01,.5,1.01),CF.N(),false,false) | |
1286 | FACE.Transparency = 0+(i-1)/35.2 | |
1287 | FACE.Name = 'ShadowFace' | |
1288 | Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE | |
1289 | NewInstance("Weld",Head,{Part0=Head,Part1=FACE,C0=CF.N(0,.35-(i-1)/75,0)}) | |
1290 | NewInstance("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0)) | |
1291 | end | |
1292 | Hum = NewInstance("Humanoid",Char,{DisplayDistanceType='None'}) | |
1293 | Hum.MaxHealth = MaxHealth | |
1294 | Hum.Health = MaxHealth | |
1295 | swait(5) | |
1296 | Char.Parent = workspace | |
1297 | ||
1298 | Attack = false | |
1299 | end | |
1300 | ||
1301 | Humanoid.Died:connect(function() | |
1302 | refit() | |
1303 | end) | |
1304 | ||
1305 | --// Wrap it all up \\-- | |
1306 | while true do | |
1307 | swait() | |
1308 | Sine = Sine + Change | |
1309 | if(not Music)then | |
1310 | Music = Sound(Torso,MusicID,1,3,true,false,true) | |
1311 | Music.Name = 'Music' | |
1312 | end | |
1313 | Music.Pitch = 1 | |
1314 | Music.Volume = 5 | |
1315 | Music.SoundId = "rbxassetid://"..MusicID | |
1316 | Music.Parent = Char | |
1317 | Music:Resume() | |
1318 | 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) | |
1319 | local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1) | |
1320 | 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") | |
1321 | if(not Effects or not Effects.Parent)then | |
1322 | Effects = IN("Model",Char) | |
1323 | Effects.Name = "Effects" | |
1324 | end | |
1325 | Hum.WalkSpeed = WalkSpeed | |
1326 | if(State == 'Walk')then | |
1327 | if(Hum.WalkSpeed >= 24)then | |
1328 | local wsVal = 22 / (Hum.WalkSpeed/16) | |
1329 | local Alpha = math.min(.1 * (Hum.WalkSpeed/16),1) | |
1330 | Change = 2 | |
1331 | 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) | |
1332 | 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) | |
1333 | else | |
1334 | Change = .9 | |
1335 | local wsVal = 8 / (Hum.WalkSpeed/8) | |
1336 | local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1) | |
1337 | 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) | |
1338 | 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) | |
1339 | end | |
1340 | else | |
1341 | RH.C1 = RH.C1:lerp(CF.N(0,1,0),.1) | |
1342 | LH.C1 = LH.C1:lerp(CF.N(0,1,0),.1) | |
1343 | end | |
1344 | for _,v in next, Char:children() do | |
1345 | if(v:IsA'Accessory')then | |
1346 | v:destroy() | |
1347 | elseif(v:IsA'Shirt')then | |
1348 | v.ShirtTemplate = "rbxassetid://140183207" | |
1349 | elseif(v:IsA'Pants')then | |
1350 | v.PantsTemplate = "rbxassetid://1173789285" | |
1351 | elseif(v:FindFirstChildOfClass'ShirtGraphic')then | |
1352 | v:FindFirstChildOfClass'ShirtGraphic':destroy() | |
1353 | end | |
1354 | end | |
1355 | local face = Head:FindFirstChild'face' | |
1356 | if(not face)then | |
1357 | NewInstance("Decal",Head,{Name='face',Face=Enum.NormalId.Front,Texture="rbxassetid://404306534"}) | |
1358 | else | |
1359 | face.Texture = "rbxassetid://900134257" | |
1360 | end | |
1361 | RArm.BrickColor = BrickColor.new'Pastel yellow' | |
1362 | LArm.BrickColor = BrickColor.new'Pastel yellow' | |
1363 | RLeg.BrickColor = BrickColor.new'Pastel yellow' | |
1364 | LLeg.BrickColor = BrickColor.new'Pastel yellow' | |
1365 | Torso.BrickColor = BrickColor.new'Pastel yellow' | |
1366 | Head.BrickColor = BrickColor.new'Pastel yellow' | |
1367 | if(Hum.MaxHealth ~= MaxHealth)then | |
1368 | Hum.MaxHealth = MaxHealth | |
1369 | end | |
1370 | Hum.DisplayDistanceType='None' | |
1371 | if(NeutralAnims)then | |
1372 | if(State == 'Idle')then | |
1373 | Change = 1 | |
1374 | local Alpha = .1 | |
1375 | 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) | |
1376 | 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) | |
1377 | 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) | |
1378 | LS.C0 = clerp(LS.C0,CFrame.new(-1.32175505, 0.156236127+.15*M.C(Sine/16), 0.233877867, 0.877554953, -1.456876248, 0.145469457, 0.259513229, 0.707695842, 0.657129884, -0.403175086, -0.538916171, 0.739607573),Alpha) | |
1379 | 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, -2.00603589695, 0.268235415, -0.0907544345, 0.959069014),Alpha) | |
1380 | 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) | |
1381 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1382 | -- idle | |
1383 | elseif(State == 'Walk')then | |
1384 | if(Hum.WalkSpeed >= 24)then | |
1385 | local wsVal = 22 / (Hum.WalkSpeed/16) | |
1386 | local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1) | |
1387 | 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) | |
1388 | 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) | |
1389 | 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) | |
1390 | NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(15),0,0),Alpha) | |
1391 | 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) | |
1392 | 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) | |
1393 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1394 | else | |
1395 | local wsVal = 8 / (Hum.WalkSpeed/8) | |
1396 | local Alpha = math.min(.2 * (Hum.WalkSpeed/8),1) | |
1397 | 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) | |
1398 | 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) | |
1399 | 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) | |
1400 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1401 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha) | |
1402 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.05*M.C(Sine/(wsVal/2)),0),Alpha) | |
1403 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1404 | end | |
1405 | elseif(State == 'Jump' or State == 'Fall')then | |
1406 | if(Walking)then | |
1407 | local Alpha = .2 | |
1408 | 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) | |
1409 | 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) | |
1410 | 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) | |
1411 | 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) | |
1412 | 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) | |
1413 | 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) | |
1414 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1415 | else | |
1416 | local Alpha = .2 | |
1417 | 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) | |
1418 | 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) | |
1419 | 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) | |
1420 | 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) | |
1421 | 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) | |
1422 | 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) | |
1423 | HW.C0 = HW.C0:lerp(CF.N(0,-1,-1)*CF.A(M.R(-90),0,0),Alpha) | |
1424 | end | |
1425 | elseif(State == 'Paralyzed')then | |
1426 | -- paralyzed | |
1427 | elseif(State == 'Sit')then | |
1428 | -- sit | |
1429 | end | |
1430 | end | |
1431 | end |