SHOW:
|
|
- or go back to the newest paste.
1 | ||
2 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
3 | local Player,game,owner = owner,game | |
4 | local RealPlayer = Player | |
5 | do | |
6 | print("FE Compatibility code by retram") | |
7 | local rp = RealPlayer | |
8 | script.Parent = rp.Character | |
9 | ||
10 | --RemoteEvent for communicating | |
11 | local Event = Instance.new("RemoteEvent") | |
12 | Event.Name = "UserInput_Event" | |
13 | ||
14 | --Fake event to make stuff like Mouse.KeyDown work | |
15 | local function fakeEvent() | |
16 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end} | |
17 | t.connect = t.Connect | |
18 | return t | |
19 | end | |
20 | ||
21 | --Creating fake input objects with fake variables | |
22 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} | |
23 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} | |
24 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) | |
25 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil | |
26 | end} | |
27 | --Merged 2 functions into one by checking amount of arguments | |
28 | CAS.UnbindAction = CAS.BindAction | |
29 | ||
30 | --This function will trigger the events that have been :Connect()'ed | |
31 | local function te(self,ev,...) | |
32 | local t = m[ev] | |
33 | if t and t._fakeEvent then | |
34 | for _,f in pairs(t.Functions) do | |
35 | f(...) | |
36 | end | |
37 | end | |
38 | end | |
39 | m.TrigEvent = te | |
40 | UIS.TrigEvent = te | |
41 | ||
42 | Event.OnServerEvent:Connect(function(plr,io) | |
43 | if plr~=rp then return end | |
44 | m.Target = io.Target | |
45 | m.Hit = io.Hit | |
46 | if not io.isMouse then | |
47 | local b = io.UserInputState == Enum.UserInputState.Begin | |
48 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
49 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
50 | end | |
51 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
52 | return m:TrigEvent(b and "Button2Down" or "Button2Up") | |
53 | end | |
54 | for _,t in pairs(CAS.Actions) do | |
55 | for _,k in pairs(t.Keys) do | |
56 | if k==io.KeyCode then | |
57 | t.Function(t.Name,io.UserInputState,io) | |
58 | end | |
59 | end | |
60 | end | |
61 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
62 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
63 | end | |
64 | end) | |
65 | Event.Parent = NLS([==[ | |
66 | local Player = game:GetService("Players").LocalPlayer | |
67 | local Event = script:WaitForChild("UserInput_Event") | |
68 | local Mouse = Player:GetMouse() | |
69 | local UIS = game:GetService("UserInputService") | |
70 | local input = function(io,a) | |
71 | if a then return end | |
72 | --Since InputObject is a client-side instance, we create and pass table instead | |
73 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) | |
74 | end | |
75 | UIS.InputBegan:Connect(input) | |
76 | UIS.InputEnded:Connect(input) | |
77 | local h,t | |
78 | --Give the server mouse data 30 times every second, but only if the values changed | |
79 | --If player is not moving their mouse, client won't fire events | |
80 | while wait(1/30) do | |
81 | if h~=Mouse.Hit or t~=Mouse.Target then | |
82 | h,t=Mouse.Hit,Mouse.Target | |
83 | Event:FireServer({isMouse=true,Target=t,Hit=h}) | |
84 | end | |
85 | end]==],Player.Character) | |
86 | ||
87 | ----Sandboxed game object that allows the usage of client-side methods and services | |
88 | --Real game object | |
89 | local _rg = game | |
90 | ||
91 | --Metatable for fake service | |
92 | local fsmt = { | |
93 | __index = function(self,k) | |
94 | local s = rawget(self,"_RealService") | |
95 | if s then | |
96 | return typeof(s[k])=="function" | |
97 | and function(_,...)return s[k](s,...)end or s[k] | |
98 | end | |
99 | end, | |
100 | __newindex = function(self,k,v) | |
101 | local s = rawget(self,"_RealService") | |
102 | if s then s[k]=v end | |
103 | end | |
104 | } | |
105 | local function FakeService(t,RealService) | |
106 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
107 | return setmetatable(t,fsmt) | |
108 | end | |
109 | ||
110 | --Fake game object | |
111 | local g = { | |
112 | GetService = function(self,s) | |
113 | return rawget(self,s) or _rg:GetService(s) | |
114 | end, | |
115 | Players = FakeService({ | |
116 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player) | |
117 | },"Players"), | |
118 | UserInputService = FakeService(UIS,"UserInputService"), | |
119 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
120 | RunService = FakeService({ | |
121 | _btrs = {}, | |
122 | RenderStepped = _rg:GetService("RunService").Heartbeat, | |
123 | BindToRenderStep = function(self,name,_,fun) | |
124 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
125 | end, | |
126 | UnbindFromRenderStep = function(self,name) | |
127 | self._btrs[name]:Disconnect() | |
128 | end, | |
129 | },"RunService") | |
130 | } | |
131 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
132 | g.service = g.GetService | |
133 | FakeService(g,game) | |
134 | --Changing owner to fake player object to support owner:GetMouse() | |
135 | game,owner = g,g.Players.LocalPlayer | |
136 | end | |
137 | -- Created by Nebula_Zorua -- | |
138 | -- Sans Curse (A Curse of Light) -- | |
139 | -- Custom Arcane Adventures Magic -- | |
140 | -- Wielder: Everybody (Released) -- | |
141 | -- Why the fuck did I make this -- | |
142 | -- I don't even LIKE undertale -- | |
143 | -- what the fuck -- | |
144 | ||
145 | -- Discord: Nebula the Zorua#6969 | |
146 | -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA | |
147 | ||
148 | -- You can change the Magic Circle n stuff down under Customization, at MagicVariant -- | |
149 | ||
150 | ||
151 | --// Shortcut Variables \\-- | |
152 | local S = setmetatable({},{__index = function(s,i) return game:service(i) end}) | |
153 | local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ} | |
154 | local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV} | |
155 | local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis} | |
156 | 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} | |
157 | local R3 = {N=Region3.new} | |
158 | local De = S.Debris | |
159 | local WS = workspace | |
160 | local Lght = S.Lighting | |
161 | local RepS = S.ReplicatedStorage | |
162 | local IN = Instance.new | |
163 | local Plrs = S.Players | |
164 | ||
165 | local Emit = IN("ParticleEmitter").Emit; | |
166 | ||
167 | --// Initializing \\-- | |
168 | local Plr = Plrs.LocalPlayer | |
169 | local Char = Plr.Character | |
170 | local Hum = Char:FindFirstChildOfClass'Humanoid' | |
171 | local RArm = Char["Right Arm"] | |
172 | local LArm = Char["Left Arm"] | |
173 | local RLeg = Char["Right Leg"] | |
174 | local LLeg = Char["Left Leg"] | |
175 | local Root = Char:FindFirstChild'HumanoidRootPart' | |
176 | local Torso = Char.Torso | |
177 | local Head = Char.Head | |
178 | local NeutralAnims = true | |
179 | local Attack = false | |
180 | local Debounces = {Debounces={}} | |
181 | local Mouse = Plr:GetMouse() | |
182 | local Hit = {} | |
183 | local Sine = 0 | |
184 | local Change = 1 | |
185 | ||
186 | local Effects = IN("Folder",Char) | |
187 | Effects.Name = "Effects" | |
188 | ||
189 | ||
190 | --// Debounce System \\-- | |
191 | ||
192 | ||
193 | function Debounces:New(name,cooldown) | |
194 | local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0} | |
195 | setmetatable(aaaaa,{__index = Debounces}) | |
196 | Debounces.Debounces[name] = aaaaa | |
197 | return aaaaa | |
198 | end | |
199 | ||
200 | function Debounces:Use(overrideUsable) | |
201 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
202 | if(self.Usable or overrideUsable)then | |
203 | self.Usable = false | |
204 | self.CoolingDown = true | |
205 | local LastUse = time() | |
206 | self.LastUse = LastUse | |
207 | delay(self.Cooldown or 2,function() | |
208 | if(self.LastUse == LastUse)then | |
209 | self.CoolingDown = false | |
210 | self.Usable = true | |
211 | end | |
212 | end) | |
213 | end | |
214 | end | |
215 | ||
216 | function Debounces:Get(name) | |
217 | assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name))) | |
218 | for i,v in next, Debounces.Debounces do | |
219 | if(i == name)then | |
220 | return v; | |
221 | end | |
222 | end | |
223 | end | |
224 | ||
225 | function Debounces:GetProgressPercentage() | |
226 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
227 | if(self.CoolingDown and not self.Usable)then | |
228 | return math.max( | |
229 | math.floor( | |
230 | ( | |
231 | (time()-self.LastUse)/self.Cooldown or 2 | |
232 | )*100 | |
233 | ) | |
234 | ) | |
235 | else | |
236 | return 100 | |
237 | end | |
238 | end | |
239 | ||
240 | --// Instance Creation Functions \\-- | |
241 | ||
242 | function Sound(parent,id,pitch,volume,looped,effect,autoPlay) | |
243 | local Sound = IN("Sound") | |
244 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
245 | Sound.Pitch = pitch or 1 | |
246 | Sound.Volume = volume or 1 | |
247 | Sound.Looped = looped or false | |
248 | if(autoPlay)then | |
249 | coroutine.wrap(function() | |
250 | repeat wait() until Sound.IsLoaded | |
251 | Sound.Playing = autoPlay or false | |
252 | end)() | |
253 | end | |
254 | if(not looped and effect)then | |
255 | Sound.Stopped:connect(function() | |
256 | Sound.Volume = 0 | |
257 | Sound:destroy() | |
258 | end) | |
259 | elseif(effect)then | |
260 | warn("Sound can't be looped and a sound effect!") | |
261 | end | |
262 | Sound.Parent =parent or Torso | |
263 | return Sound | |
264 | end | |
265 | function Part(parent,color,material,size,cframe,anchored,cancollide) | |
266 | local part = IN("Part") | |
267 | part.Parent = parent or Char | |
268 | part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0) | |
269 | part.Material = material or Enum.Material.SmoothPlastic | |
270 | part.TopSurface,part.BottomSurface=10,10 | |
271 | part.Size = size or V3.N(1,1,1) | |
272 | part.CFrame = cframe or CF.N(0,0,0) | |
273 | part.CanCollide = cancollide or false | |
274 | part.Anchored = anchored or false | |
275 | return part | |
276 | end | |
277 | ||
278 | function Weld(part0,part1,c0,c1) | |
279 | local weld = IN("Weld") | |
280 | weld.Parent = part0 | |
281 | weld.Part0 = part0 | |
282 | weld.Part1 = part1 | |
283 | weld.C0 = c0 or CF.N() | |
284 | weld.C1 = c1 or CF.N() | |
285 | return weld | |
286 | end | |
287 | ||
288 | function Mesh(parent,meshtype,meshid,textid,scale,offset) | |
289 | local part = IN("SpecialMesh") | |
290 | part.MeshId = meshid or "" | |
291 | part.TextureId = textid or "" | |
292 | part.Scale = scale or V3.N(1,1,1) | |
293 | part.Offset = offset or V3.N(0,0,0) | |
294 | part.MeshType = meshtype or Enum.MeshType.Sphere | |
295 | part.Parent = parent | |
296 | return part | |
297 | end | |
298 | ||
299 | NewInstance = function(instance,parent,properties) | |
300 | local inst = Instance.new(instance) | |
301 | inst.Parent = parent | |
302 | if(properties)then | |
303 | for i,v in next, properties do | |
304 | pcall(function() inst[i] = v end) | |
305 | end | |
306 | end | |
307 | return inst; | |
308 | end | |
309 | ||
310 | function Clone(instance,parent,properties) | |
311 | local inst = instance:Clone() | |
312 | inst.Parent = parent | |
313 | if(properties)then | |
314 | for i,v in next, properties do | |
315 | pcall(function() inst[i] = v end) | |
316 | end | |
317 | end | |
318 | return inst; | |
319 | end | |
320 | ||
321 | function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf) | |
322 | local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()}) | |
323 | local Sound = IN("Sound") | |
324 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
325 | Sound.Pitch = pitch or 1 | |
326 | Sound.Volume = volume or 1 | |
327 | Sound.Looped = looped or false | |
328 | if(autoPlay)then | |
329 | coroutine.wrap(function() | |
330 | repeat wait() until Sound.IsLoaded | |
331 | Sound.Playing = autoPlay or false | |
332 | end)() | |
333 | end | |
334 | if(not looped and effect)then | |
335 | Sound.Stopped:connect(function() | |
336 | Sound.Volume = 0 | |
337 | soundPart:destroy() | |
338 | end) | |
339 | elseif(effect)then | |
340 | warn("Sound can't be looped and a sound effect!") | |
341 | end | |
342 | Sound.Parent = soundPart | |
343 | return Sound | |
344 | end | |
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 | --// Require stuff \\-- | |
350 | function CamShake(who,times,intense,origin) | |
351 | coroutine.wrap(function() | |
352 | if(script:FindFirstChild'CamShake')then | |
353 | local cam = script.CamShake:Clone() | |
354 | cam:WaitForChild'intensity'.Value = intense | |
355 | cam:WaitForChild'times'.Value = times | |
356 | ||
357 | if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end | |
358 | cam.Parent = who | |
359 | wait() | |
360 | cam.Disabled = false | |
361 | elseif(who == Plr or who == Char)then | |
362 | local intensity = intense | |
363 | local cam = workspace.CurrentCamera | |
364 | for i = 1, times do | |
365 | local camDistFromOrigin | |
366 | if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then | |
367 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25 | |
368 | elseif(typeof(origin) == 'Vector3')then | |
369 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25 | |
370 | end | |
371 | if(camDistFromOrigin)then | |
372 | intensity = math.min(intense, math.floor(intense/camDistFromOrigin)) | |
373 | end | |
374 | cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4) | |
375 | swait() | |
376 | end | |
377 | end | |
378 | end)() | |
379 | end | |
380 | ||
381 | function CamShakeAll(times,intense,origin) | |
382 | for _,v in next, Plrs:players() do | |
383 | CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin) | |
384 | end | |
385 | end | |
386 | ||
387 | function ServerScript(code) | |
388 | if(script:FindFirstChild'Loadstring')then | |
389 | local load = script.Loadstring:Clone() | |
390 | load:WaitForChild'Sauce'.Value = code | |
391 | load.Disabled = false | |
392 | load.Parent = workspace | |
393 | elseif(NS and typeof(NS) == 'function')then | |
394 | NS(code,workspace) | |
395 | else | |
396 | warn("no serverscripts lol") | |
397 | end | |
398 | end | |
399 | ||
400 | function RunLocal(where,code) | |
401 | ServerScript([[ | |
402 | wait() | |
403 | script.Parent=nil | |
404 | if(not _G.Http)then _G.Http = game:service'HttpService' end | |
405 | ||
406 | local Http = _G.Http or game:service'HttpService' | |
407 | ||
408 | local source = ]].."[["..code.."]]"..[[ | |
409 | local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php" | |
410 | local asd = Http:PostAsync(link,source) | |
411 | repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID | |
412 | local ID = Http:JSONDecode(asd).Result.Require_ID | |
413 | local vs = require(ID).VORTH_SCRIPT | |
414 | vs.Parent = game.]]..where:GetFullName() | |
415 | ) | |
416 | end | |
417 | ||
418 | --// Customization \\-- | |
419 | ||
420 | local Frame_Speed = 60; | |
421 | local WalkSpeed = 16 | |
422 | local DamageColor = BrickColor.new'White' | |
423 | ||
424 | local MagicCircles = { | |
425 | Default = {Color=C3.N(1,1,1),Texture1=0,Texture2=0}, | |
426 | OrangeWarPheonix = {EffectColor=BrickColor.new'Deep orange'.Color,Color=C3.N(.9,.9,.9),Texture1=623153986,Texture2=623153990}, | |
427 | BlueWarPheonix = {EffectColor=BrickColor.new'Teal'.Color,Color=C3.N(.9,.9,.9),Texture1=462499935,Texture2=462499970}, | |
428 | Plasma = {Color=C3.N(0.70588235294118,0,0.8),Texture1=415906687,Texture2=415906702}, | |
429 | Water = {Color=C3.RGB(33, 84, 185),Texture1=408441330,Texture2=408441353}, | |
430 | Earth = {Color=C3.RGB(86, 36, 36),Texture1=394253616,Texture2=394253651}, | |
431 | Wind = {Color=C3.N(.8,.8,.8),Texture1=376006317,Texture2=376006346}, | |
432 | Poseidon = {Color=C3.RGB(71, 99, 130),Texture1=346727970,Texture2=346727994}, | |
433 | AetherLightning = {Color=C3.RGB(23, 255, 197),Texture1=348320016,Texture2=348320030}, | |
434 | Light = {Color=C3.N(1,1,0),Texture1=343192085,Texture2=343192112}, | |
435 | Fire = {Color=C3.N(1,0,0),EffectColor=BrickColor.new'Bright red'.Color,Texture1=313945544,Texture2=313945673}, | |
436 | Lightning = {Color=C3.N(0,1,1),Texture1=314842290,Texture2=314842440}, | |
437 | GasterBlaster = {Color=C3.N(1,1,1),Texture1=331948662,Texture2=331948662} | |
438 | } | |
439 | ||
440 | local MagicVariant = MagicCircles.GasterBlaster --[[ You can change this for a different element | |
441 | Example: | |
442 | ||
443 | Changing MagicCircles.GasterBlaster to MagicCircles.Light | |
444 | ||
445 | would make it a Light Element | |
446 | ]] | |
447 | ||
448 | --// Stop animations \\-- | |
449 | for _,v in next, Hum:GetPlayingAnimationTracks() do | |
450 | v:Stop(); | |
451 | end | |
452 | ||
453 | pcall(game.Destroy,Char:FindFirstChild'Animate') | |
454 | pcall(game.Destroy,Hum:FindFirstChild'Animator') | |
455 | ||
456 | --// Joints \\-- | |
457 | ||
458 | local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5,0.5,0),C1 = CF.N(0,.5,0)}) | |
459 | local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5,0.5,0),C1 = CF.N(0,.5,0)}) | |
460 | local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5,0)}) | |
461 | local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5,-1,0),C1 = CF.N(0,1,0)}) | |
462 | local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5,-1,0),C1 = CF.N(0,1,0)}) | |
463 | local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso}) | |
464 | ||
465 | local LSC0 = LS.C0 | |
466 | local RSC0 = RS.C0 | |
467 | local NKC0 = NK.C0 | |
468 | local LHC0 = LH.C0 | |
469 | local RHC0 = RH.C0 | |
470 | local RJC0 = RJ.C0 | |
471 | ||
472 | --// Artificial HB \\-- | |
473 | ||
474 | local ArtificialHB = IN("BindableEvent", script) | |
475 | ArtificialHB.Name = "Heartbeat" | |
476 | ||
477 | script:WaitForChild("Heartbeat") | |
478 | ||
479 | local tf = 0 | |
480 | local allowframeloss = false | |
481 | local tossremainder = false | |
482 | local lastframe = tick() | |
483 | local frame = 1/Frame_Speed | |
484 | ArtificialHB:Fire() | |
485 | ||
486 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
487 | tf = tf + s | |
488 | if tf >= frame then | |
489 | if allowframeloss then | |
490 | script.Heartbeat:Fire() | |
491 | lastframe = tick() | |
492 | else | |
493 | for i = 1, math.floor(tf / frame) do | |
494 | ArtificialHB:Fire() | |
495 | end | |
496 | lastframe = tick() | |
497 | end | |
498 | if tossremainder then | |
499 | tf = 0 | |
500 | else | |
501 | tf = tf - frame * math.floor(tf / frame) | |
502 | end | |
503 | end | |
504 | end) | |
505 | ||
506 | function swait(num) | |
507 | if num == 0 or num == nil then | |
508 | ArtificialHB.Event:wait() | |
509 | else | |
510 | for i = 0, num do | |
511 | ArtificialHB.Event:wait() | |
512 | end | |
513 | end | |
514 | end | |
515 | ||
516 | ||
517 | --// Effect Function(s) \\-- | |
518 | ||
519 | function NumSeq(...) | |
520 | local tab = {...} | |
521 | local Sequence = {} | |
522 | for _,v in next, tab do | |
523 | table.insert(Sequence,NumberSequenceKeypoint.new(unpack(v))) | |
524 | end | |
525 | if(tab[#tab][1] ~= 1)then | |
526 | local final = tab[#tab] | |
527 | table.insert(Sequence,NumberSequenceKeypoint.new(1,final[2],final[3])) | |
528 | end | |
529 | return NumberSequence.new(Sequence) | |
530 | end | |
531 | ||
532 | local DefaultRingParticle = IN("ParticleEmitter") | |
533 | DefaultRingParticle.Name = 'RingEmit' | |
534 | DefaultRingParticle.LightEmission = 1 | |
535 | DefaultRingParticle.Size = NumSeq({0,0},{.7,6.28},{.8,5.03},{1,2.9}) | |
536 | DefaultRingParticle.Texture = "rbxassetid://313951123" | |
537 | DefaultRingParticle.Transparency = NumberSequence.new(0,1) | |
538 | DefaultRingParticle.ZOffset = 1 | |
539 | DefaultRingParticle.Drag = 0 | |
540 | DefaultRingParticle.Acceleration = V3.N() | |
541 | DefaultRingParticle.LockedToPart = true | |
542 | DefaultRingParticle.Enabled = false | |
543 | DefaultRingParticle.Lifetime = NumberRange.new(.6,.6) | |
544 | DefaultRingParticle.Rate = 5 | |
545 | DefaultRingParticle.Rotation = NumberRange.new(0,0) | |
546 | DefaultRingParticle.RotSpeed = NumberRange.new(0,0) | |
547 | DefaultRingParticle.Speed = NumberRange.new(0,0) | |
548 | DefaultRingParticle.SpreadAngle = Vector2.new(0,0) | |
549 | ||
550 | function MagicCircle(Data) | |
551 | local Variant = Data.Variant or MagicCircles.Default; | |
552 | ||
553 | local Size = Data.Size or 10; | |
554 | local Pos = Data.Pos*CF.A(M.R(-90),M.R(-90),0) or Torso.CFrame*CF.A(M.R(-90),M.R(-90),0); | |
555 | local GrowTime = Data.Time or 1; | |
556 | ||
557 | local WeldData = Data.Weld or false; | |
558 | ||
559 | ||
560 | local Color = Variant.Color or C3.N(.9,.9,.0) | |
561 | ||
562 | local CreationParticle = Data.CreationParticle or DefaultRingParticle; | |
563 | ||
564 | ||
565 | local Circle = Part(Effects,BrickColor.new'Maroon',Enum.Material.SmoothPlastic,V3.N(.05,.05,.05),Pos,true,false) | |
566 | local CircleM = NewInstance("BlockMesh",Circle,{Scale=V3.N()}) | |
567 | ||
568 | ||
569 | local Emitter = DefaultRingParticle:Clone(); | |
570 | Emitter.Parent = Circle | |
571 | Emitter.Color = ColorSequence.new(Variant.Color) | |
572 | ||
573 | local Top = IN("Decal",Circle) | |
574 | Top.Texture = "rbxassetid://"..Variant.Texture1 | |
575 | Top.Face = Enum.NormalId.Top | |
576 | ||
577 | local Btm = IN("Decal",Circle) | |
578 | Btm.Texture = "rbxassetid://"..Variant.Texture2 | |
579 | Btm.Face = Enum.NormalId.Bottom | |
580 | ||
581 | if(WeldData)then | |
582 | Circle.Anchored = false | |
583 | Weld(WeldData,Circle,Pos,CF.N()) | |
584 | end | |
585 | local GrowFrames = GrowTime * Frame_Speed | |
586 | print(GrowFrames) | |
587 | --Size*20,0,Size*20 | |
588 | Circle.Transparency = 1 | |
589 | local GrownEvent = Instance.new("BindableEvent",Circle) | |
590 | coroutine.wrap(function() | |
591 | ||
592 | Emit(Emitter,5) | |
593 | local End = Size*20 | |
594 | local grow = End/GrowFrames | |
595 | for i = 1, GrowFrames+1 do | |
596 | local aa = math.min(CircleM.Scale.x + grow,End) | |
597 | if(aa >= End)then break end | |
598 | CircleM.Scale = V3.N(aa,0,aa) | |
599 | swait() | |
600 | end | |
601 | CircleM.Scale = V3.N(End,0,End) | |
602 | GrownEvent:Fire() | |
603 | ||
604 | end)() | |
605 | ||
606 | local Table = { | |
607 | Circle = Circle, | |
608 | Mesh = CircleM, | |
609 | Grow = function(size) | |
610 | CircleM.Scale = CircleM.Scale + V3.N(size*20,0,size*20) | |
611 | end, | |
612 | Destroy = function(timer) | |
613 | coroutine.wrap(function() | |
614 | if(not timer)then timer = 1 end | |
615 | Tween(CircleM,{Scale=V3.N(0,0,0)},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out) | |
616 | Tween(Top,{Transparency=1},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out) | |
617 | Tween(Btm,{Transparency=1},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out) | |
618 | S.Debris:AddItem(Circle,timer+1) | |
619 | end)() | |
620 | end, | |
621 | Grown = GrownEvent.Event | |
622 | } | |
623 | ||
624 | return Table; | |
625 | end | |
626 | ||
627 | function Bezier(startpos, pos2, pos3, endpos, t) | |
628 | local A = startpos:lerp(pos2, t) | |
629 | local B = pos2:lerp(pos3, t) | |
630 | local C = pos3:lerp(endpos, t) | |
631 | local lerp1 = A:lerp(B, t) | |
632 | local lerp2 = B:lerp(C, t) | |
633 | local cubic = lerp1:lerp(lerp2, t) | |
634 | return cubic | |
635 | end | |
636 | ||
637 | function SphereFX(duration,color,scale,pos,endScale,increment) | |
638 | return Effect{ | |
639 | Frames=duration, | |
640 | Effect='ResizeAndFade', | |
641 | Color=color, | |
642 | Size=scale, | |
643 | Mesh={MeshType=Enum.MeshType.Sphere}, | |
644 | CFrame=pos, | |
645 | FXSettings={ | |
646 | EndSize=endScale, | |
647 | EndIsIncrement=increment | |
648 | } | |
649 | } | |
650 | end | |
651 | ||
652 | function BlastFX(duration,color,scale,pos,endScale,increment) | |
653 | return Effect{ | |
654 | Frames=duration, | |
655 | Effect='ResizeAndFade', | |
656 | Color=color, | |
657 | Size=scale, | |
658 | Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'}, | |
659 | CFrame=pos, | |
660 | FXSettings={ | |
661 | EndSize=endScale, | |
662 | EndIsIncrement=increment | |
663 | } | |
664 | } | |
665 | end | |
666 | ||
667 | function BlockFX(duration,color,scale,pos,endScale,increment) | |
668 | return Effect{ | |
669 | Frames=duration, | |
670 | Effect='ResizeAndFade', | |
671 | Color=color, | |
672 | Size=scale, | |
673 | CFrame=pos, | |
674 | FXSettings={ | |
675 | EndSize=endScale, | |
676 | EndIsIncrement=increment | |
677 | } | |
678 | } | |
679 | end | |
680 | ||
681 | function ShootBullet(data) | |
682 | --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10} | |
683 | local Size = data.Size or V3.N(2,2,2) | |
684 | local Color = data.Color or MagicVariant.EffectColor or MagicVariant.Color | |
685 | local StudsPerFrame = data.Speed or 10 | |
686 | local Shape = data.Shape or 'Ball' | |
687 | local Frames = data.Frames or 160 | |
688 | local Pos = data.Origin or Torso.CFrame | |
689 | local Direction = data.Direction or Mouse.Hit | |
690 | local Material = data.Material or Enum.Material.Neon | |
691 | local OnHit = data.HitFunction or function(hit,pos) | |
692 | Effect{ | |
693 | Effect='ResizeAndFade', | |
694 | Color=Color, | |
695 | Size=V3.N(10,10,10), | |
696 | Mesh={MeshType=Enum.MeshType.Sphere}, | |
697 | CFrame=CF.N(pos), | |
698 | FXSettings={ | |
699 | EndSize=V3.N(.05,.05,.05), | |
700 | EndIsIncrement=true | |
701 | } | |
702 | } | |
703 | for i = 1, 5 do | |
704 | local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)) | |
705 | Effect{ | |
706 | Effect='Fade', | |
707 | Frames=65, | |
708 | Size=V3.N(5,5,10), | |
709 | CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos), | |
710 | Mesh = {MeshType=Enum.MeshType.Sphere}, | |
711 | Material=Enum.Material.Neon, | |
712 | Color=Color, | |
713 | MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p, | |
714 | } | |
715 | end | |
716 | AOEDamage(pos,10,15,30,0,'Normal',10,4) | |
717 | end | |
718 | ||
719 | local Bullet = Part(Effects,Color,Material,Size,Pos,true,false) | |
720 | local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N()) | |
721 | if(Shape == 'Ball')then | |
722 | BMesh.MeshType = Enum.MeshType.Sphere | |
723 | elseif(Shape == 'Head')then | |
724 | BMesh.MeshType = Enum.MeshType.Head | |
725 | elseif(Shape == 'Cylinder')then | |
726 | BMesh.MeshType = Enum.MeshType.Cylinder | |
727 | end | |
728 | ||
729 | coroutine.wrap(function() | |
730 | for i = 1, Frames+1 do | |
731 | local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame) | |
732 | if(hit)then | |
733 | OnHit(hit,pos,norm,dist) | |
734 | break; | |
735 | else | |
736 | Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame) | |
737 | end | |
738 | swait() | |
739 | end | |
740 | Bullet:destroy() | |
741 | end)() | |
742 | ||
743 | end | |
744 | ||
745 | function Zap(data) | |
746 | local sCF,eCF = data.StartCFrame,data.EndCFrame | |
747 | assert(sCF,"You need a start CFrame!") | |
748 | assert(eCF,"You need an end CFrame!") | |
749 | local parts = data.PartCount or 15 | |
750 | local zapRot = data.ZapRotation or {-5,5} | |
751 | local startThick = data.StartSize or 3; | |
752 | local endThick = data.EndSize or startThick/2; | |
753 | local color = data.Color or BrickColor.new'Electric blue' | |
754 | local delay = data.Delay or 35 | |
755 | local delayInc = data.DelayInc or 0 | |
756 | local lastLightning; | |
757 | local MagZ = (sCF.p - eCF.p).magnitude | |
758 | local thick = startThick | |
759 | local inc = (startThick/parts)-(endThick/parts) | |
760 | ||
761 | for i = 1, parts do | |
762 | local pos = sCF.p | |
763 | if(lastLightning)then | |
764 | pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p | |
765 | end | |
766 | delay = delay + delayInc | |
767 | local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false) | |
768 | local posie = CF.N(pos,eCF.p)*CF.N(0,0,MagZ/parts).p+V3.N(M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot))) | |
769 | if(parts == i)then | |
770 | local MagZ = (pos-eCF.p).magnitude | |
771 | zapPart.Size = V3.N(endThick,endThick,MagZ) | |
772 | zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2) | |
773 | Effect{Effect='ResizeAndFade',Size=V3.N(thick,thick,thick),CFrame=eCF*CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)),Color=color,Frames=delay*2,FXSettings={EndSize=V3.N(thick*8,thick*8,thick*8)}} | |
774 | else | |
775 | zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2) | |
776 | end | |
777 | ||
778 | lastLightning = zapPart | |
779 | Effect{Effect='Fade',Manual=zapPart,Frames=delay} | |
780 | ||
781 | thick=thick-inc | |
782 | ||
783 | end | |
784 | end | |
785 | ||
786 | function Zap2(data) | |
787 | local Color = data.Color or BrickColor.new'Electric blue' | |
788 | local StartPos = data.Start or Torso.Position | |
789 | local EndPos = data.End or Mouse.Hit.p | |
790 | local SegLength = data.SegL or 2 | |
791 | local Thicc = data.Thickness or 0.5 | |
792 | local Fades = data.Fade or 45 | |
793 | local Parent = data.Parent or Effects | |
794 | local MaxD = data.MaxDist or 200 | |
795 | local Branch = data.Branches or false | |
796 | local Material = data.Material or Enum.Material.Neon | |
797 | local Raycasts = data.Raycasts or false | |
798 | local Offset = data.Offset or {0,360} | |
799 | local AddMesh = (data.Mesh == nil and true or data.Mesh) | |
800 | if((StartPos-EndPos).magnitude > MaxD)then | |
801 | EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p | |
802 | end | |
803 | local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude | |
804 | if(Raycasts)then | |
805 | hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD) | |
806 | end | |
807 | local segments = dist/SegLength | |
808 | local model = IN("Model",Parent) | |
809 | model.Name = 'Lightning' | |
810 | local Last; | |
811 | for i = 1, segments do | |
812 | local size = (segments-i)/25 | |
813 | local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false) | |
814 | if(AddMesh)then IN("CylinderMesh",prt) end | |
815 | if(Last and math.floor(segments) == i)then | |
816 | local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude | |
817 | prt.Size = V3.N(Thicc+size,MagZ,Thicc+size) | |
818 | prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,EndPos)*CF.A(M.R(90),0,0)*CF.N(0,-MagZ/2,0) | |
819 | elseif(not Last)then | |
820 | prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0) | |
821 | else | |
822 | prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,CF.N(pos)*CF.A(M.R(M.RNG(0,360)),M.R(M.RNG(0,360)),M.R(M.RNG(0,360)))*CF.N(0,0,SegLength/3+(segments-i)).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0) | |
823 | end | |
824 | Last = prt | |
825 | if(Branch)then | |
826 | local choice = M.RNG(1,7+((segments-i)*2)) | |
827 | if(choice == 1)then | |
828 | local LastB; | |
829 | for i2 = 1,M.RNG(2,5) do | |
830 | local size2 = ((segments-i)/35)/i2 | |
831 | local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false) | |
832 | if(AddMesh)then IN("CylinderMesh",prt) end | |
833 | if(not LastB)then | |
834 | prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,Last.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0) | |
835 | else | |
836 | prt.CFrame = CF.N(LastB.CFrame*CF.N(0,-SegLength/2,0).p,LastB.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0) | |
837 | end | |
838 | LastB = prt | |
839 | end | |
840 | end | |
841 | end | |
842 | end | |
843 | if(Fades > 0)then | |
844 | coroutine.wrap(function() | |
845 | for i = 1, Fades do | |
846 | for _,v in next, model:children() do | |
847 | if(v:IsA'BasePart')then | |
848 | v.Transparency = (i/Fades) | |
849 | end | |
850 | end | |
851 | swait() | |
852 | end | |
853 | model:destroy() | |
854 | end)() | |
855 | else | |
856 | S.Debris:AddItem(model,.01) | |
857 | end | |
858 | return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model} | |
859 | end | |
860 | ||
861 | function Tween(obj,props,time,easing,direction,repeats,backwards) | |
862 | local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false) | |
863 | local tween = S.TweenService:Create(obj, info, props) | |
864 | ||
865 | tween:Play() | |
866 | end | |
867 | ||
868 | function Effect(data) | |
869 | local FX = data.Effect or 'ResizeAndFade' | |
870 | local Parent = data.Parent or Effects | |
871 | local Color = data.Color or C3.N(0,0,0) | |
872 | local Size = data.Size or V3.N(1,1,1) | |
873 | local MoveDir = data.MoveDirection or nil | |
874 | local MeshData = data.Mesh or nil | |
875 | local SndData = data.Sound or nil | |
876 | local Frames = data.Frames or 45 | |
877 | local Manual = data.Manual or nil | |
878 | local Material = data.Material or Enum.Material.Neon | |
879 | local CFra = data.CFrame or Torso.CFrame | |
880 | local Settings = data.FXSettings or {} | |
881 | local Shape = data.Shape or Enum.PartType.Block | |
882 | local Snd,Prt,Msh; | |
883 | coroutine.wrap(function() | |
884 | if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then | |
885 | Prt = Manual | |
886 | else | |
887 | Prt = Part(Parent,Color,Material,Size,CFra,true,false) | |
888 | Prt.Shape = Shape | |
889 | end | |
890 | if(typeof(MeshData) == 'table')then | |
891 | Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset) | |
892 | elseif(typeof(MeshData) == 'Instance')then | |
893 | Msh = MeshData:Clone() | |
894 | Msh.Parent = Prt | |
895 | elseif(Shape == Enum.PartType.Block)then | |
896 | Msh = Mesh(Prt,Enum.MeshType.Brick) | |
897 | end | |
898 | if(typeof(SndData) == 'table')then | |
899 | Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true) | |
900 | elseif(typeof(SndData) == 'Instance')then | |
901 | Snd = SndData | |
902 | end | |
903 | if(Snd)then | |
904 | repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0 | |
905 | Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch | |
906 | end | |
907 | Size = (Msh and Msh.Scale or Size) | |
908 | local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2) | |
909 | ||
910 | local MoveSpeed = nil; | |
911 | if(MoveDir)then | |
912 | MoveSpeed = (CFra.p - MoveDir).magnitude/Frames | |
913 | end | |
914 | if(FX ~= 'Arc')then | |
915 | for Frame = 1, Frames do | |
916 | if(FX == "Fade")then | |
917 | Prt.Transparency = (Frame/Frames) | |
918 | elseif(FX == "Resize")then | |
919 | if(not Settings.EndSize)then | |
920 | Settings.EndSize = V3.N(0,0,0) | |
921 | end | |
922 | if(Settings.EndIsIncrement)then | |
923 | if(Msh)then | |
924 | Msh.Scale = Msh.Scale + Settings.EndSize | |
925 | else | |
926 | Prt.Size = Prt.Size + Settings.EndSize | |
927 | end | |
928 | else | |
929 | if(Msh)then | |
930 | Msh.Scale = Msh.Scale - grow/Frames | |
931 | else | |
932 | Prt.Size = Prt.Size - grow/Frames | |
933 | end | |
934 | end | |
935 | elseif(FX == "ResizeAndFade")then | |
936 | if(not Settings.EndSize)then | |
937 | Settings.EndSize = V3.N(0,0,0) | |
938 | end | |
939 | if(Settings.EndIsIncrement)then | |
940 | if(Msh)then | |
941 | Msh.Scale = Msh.Scale + Settings.EndSize | |
942 | else | |
943 | Prt.Size = Prt.Size + Settings.EndSize | |
944 | end | |
945 | else | |
946 | if(Msh)then | |
947 | Msh.Scale = Msh.Scale - grow/Frames | |
948 | else | |
949 | Prt.Size = Prt.Size - grow/Frames | |
950 | end | |
951 | end | |
952 | Prt.Transparency = (Frame/Frames) | |
953 | end | |
954 | if(Settings.RandomizeCFrame)then | |
955 | Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360)) | |
956 | end | |
957 | if(MoveDir and MoveSpeed)then | |
958 | local Orientation = Prt.Orientation | |
959 | Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed) | |
960 | Prt.Orientation = Orientation | |
961 | end | |
962 | swait() | |
963 | end | |
964 | Prt:destroy() | |
965 | else | |
966 | local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End | |
967 | if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end | |
968 | if(start and endP)then | |
969 | local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
970 | local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
971 | for Frame = 0, 1, (Settings.Speed or 0.01) do | |
972 | if(Settings.Home)then | |
973 | endP = Settings.Home.CFrame | |
974 | end | |
975 | Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame) | |
976 | end | |
977 | if(Settings.RemoveOnGoal)then | |
978 | Prt:destroy() | |
979 | end | |
980 | else | |
981 | Prt:destroy() | |
982 | assert(start,"You need a start position!") | |
983 | assert(endP,"You need a start position!") | |
984 | end | |
985 | end | |
986 | end)() | |
987 | return Prt,Msh,Snd | |
988 | end | |
989 | function SoulSteal(whom) | |
990 | local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart') | |
991 | print(torso) | |
992 | if(torso and torso:IsA'BasePart')then | |
993 | local Model = Instance.new("Model",Effects) | |
994 | Model.Name = whom.Name.."'s Soul" | |
995 | whom:BreakJoints() | |
996 | local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false) | |
997 | Soul.Name = 'Head' | |
998 | NewInstance("Humanoid",Model,{Health=0,MaxHealth=0}) | |
999 | Effect{ | |
1000 | Effect="Arc", | |
1001 | Manual = Soul, | |
1002 | FXSettings={ | |
1003 | Start=torso.CFrame, | |
1004 | Home = Torso, | |
1005 | RemoveOnGoal = true, | |
1006 | } | |
1007 | } | |
1008 | local lastPoint = Soul.CFrame.p | |
1009 | ||
1010 | for i = 0, 1, 0.01 do | |
1011 | local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0) | |
1012 | local mag = (lastPoint - Soul.Position).magnitude | |
1013 | Effect{ | |
1014 | Effect = "Fade", | |
1015 | CFrame = point * CF.N(0, mag/2, 0), | |
1016 | Size = V3.N(.5,mag+.5,.5), | |
1017 | Color = Soul.BrickColor | |
1018 | } | |
1019 | lastPoint = Soul.CFrame.p | |
1020 | swait() | |
1021 | end | |
1022 | for i = 1, 5 do | |
1023 | Effect{ | |
1024 | Effect="Fade", | |
1025 | Color = BrickColor.new'Really red', | |
1026 | MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p | |
1027 | } | |
1028 | end | |
1029 | end | |
1030 | end | |
1031 | ||
1032 | --// Other Functions \\ -- | |
1033 | ||
1034 | function CastRay(startPos,endPos,range,ignoreList) | |
1035 | local ray = Ray.new(startPos,(endPos-startPos).unit*range) | |
1036 | local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true) | |
1037 | return part,pos,norm,(pos and (startPos-pos).magnitude) | |
1038 | end | |
1039 | ||
1040 | function CastRayInDirection(startPos,direction,range,ignoreList) | |
1041 | local ray = Ray.new(startPos,direction*range) | |
1042 | local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true) | |
1043 | return part,pos,norm,(pos and (startPos-pos).magnitude) | |
1044 | end | |
1045 | ||
1046 | function getRegion(point,range,ignore) | |
1047 | return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100) | |
1048 | end | |
1049 | ||
1050 | function clerp(startCF,endCF,alpha) | |
1051 | return startCF:lerp(endCF, alpha) | |
1052 | end | |
1053 | ||
1054 | function GetTorso(char) | |
1055 | return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart' | |
1056 | end | |
1057 | ||
1058 | function ShowDamage(Pos, Text, Time, Color) | |
1059 | coroutine.wrap(function() | |
1060 | local Rate = (1 / Frame_Speed) | |
1061 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
1062 | local Text = (Text or "") | |
1063 | local Time = (Time or 2) | |
1064 | local Color = (Color or Color3.new(1, 0, 1)) | |
1065 | local EffectPart = NewInstance("Part",Effects,{ | |
1066 | Material=Enum.Material.SmoothPlastic, | |
1067 | Reflectance = 0, | |
1068 | Transparency = 1, | |
1069 | BrickColor = BrickColor.new(Color), | |
1070 | Name = "Effect", | |
1071 | Size = Vector3.new(0,0,0), | |
1072 | Anchored = true, | |
1073 | CFrame = CF.N(Pos) | |
1074 | }) | |
1075 | local BillboardGui = NewInstance("BillboardGui",EffectPart,{ | |
1076 | Size = UDim2.new(1.25, 0, 1.25, 0), | |
1077 | Adornee = EffectPart, | |
1078 | }) | |
1079 | local TextLabel = NewInstance("TextLabel",BillboardGui,{ | |
1080 | BackgroundTransparency = 1, | |
1081 | Size = UDim2.new(1, 0, 1, 0), | |
1082 | Text = Text, | |
1083 | Font = "Bodoni", | |
1084 | TextColor3 = Color, | |
1085 | TextStrokeColor3 = Color3.new(0,0,0), | |
1086 | TextStrokeTransparency=0, | |
1087 | TextScaled = true, | |
1088 | }) | |
1089 | S.Debris:AddItem(EffectPart, (Time)) | |
1090 | EffectPart.Parent = workspace | |
1091 | delay(0, function() | |
1092 | Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out) | |
1093 | local Frames = (Time / Rate) | |
1094 | for Frame = 1, Frames do | |
1095 | swait() | |
1096 | local Percent = (Frame / Frames) | |
1097 | TextLabel.TextTransparency = Percent | |
1098 | TextLabel.TextStrokeTransparency = Percent | |
1099 | end | |
1100 | if EffectPart and EffectPart.Parent then | |
1101 | EffectPart:Destroy() | |
1102 | end | |
1103 | end) end)() | |
1104 | end | |
1105 | ||
1106 | ||
1107 | function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult) | |
1108 | if(who)then | |
1109 | local hum = who:FindFirstChildOfClass'Humanoid' | |
1110 | local Damage = M.RNG(minDam,maxDam) | |
1111 | local canHit = true | |
1112 | if(hum)then | |
1113 | for _, p in pairs(Hit) do | |
1114 | if p[1] == hum then | |
1115 | if(time() - p[2] < 0.01) then | |
1116 | canHit = false | |
1117 | else | |
1118 | Hit[_] = nil | |
1119 | end | |
1120 | end | |
1121 | end | |
1122 | if(canHit)then | |
1123 | table.insert(Hit,{hum,time()}) | |
1124 | if(hum.Health >= math.huge)then | |
1125 | who:BreakJoints() | |
1126 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
1127 | 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", 1.5, C3.N(1,0,0)) | |
1128 | end | |
1129 | else | |
1130 | local player = S.Players:GetPlayerFromCharacter(who) | |
1131 | if(Type == "Fire")then | |
1132 | --idk.. | |
1133 | else | |
1134 | local c = Instance.new("ObjectValue",hum) | |
1135 | c.Name = "creator" | |
1136 | c.Value = Plr | |
1137 | game:service'Debris':AddItem(c,0.35) | |
1138 | if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then | |
1139 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
1140 | 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] "..Damage*(critMult or 2), 1.5, BrickColor.new'New Yeller'.Color) | |
1141 | end | |
1142 | hum.Health = hum.Health - Damage*(critMult or 2) | |
1143 | else | |
1144 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
1145 | 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))), Damage, 1.5, DamageColor.Color) | |
1146 | end | |
1147 | hum.Health = hum.Health - Damage | |
1148 | end | |
1149 | if(Type == 'Knockback' and GetTorso(who))then | |
1150 | local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit | |
1151 | local body = NewInstance('BodyVelocity',GetTorso(who),{ | |
1152 | P = 500, | |
1153 | maxForce = V3.N(math.huge,0,math.huge), | |
1154 | velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05 | |
1155 | }) | |
1156 | game:service'Debris':AddItem(body,.5) | |
1157 | elseif(Type == "Electric")then | |
1158 | if(M.RNG(1,100) >= critChance)then | |
1159 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
1160 | 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]", 1.5, BrickColor.new"New Yeller".Color) | |
1161 | end | |
1162 | local asd = hum.WalkSpeed/2 | |
1163 | hum.WalkSpeed = asd | |
1164 | local paralyzed = true | |
1165 | coroutine.wrap(function() | |
1166 | while paralyzed do | |
1167 | swait(25) | |
1168 | if(M.RNG(1,25) == 1)then | |
1169 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
1170 | 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]", 1.5, BrickColor.new"New Yeller".Color) | |
1171 | end | |
1172 | hum.PlatformStand = true | |
1173 | end | |
1174 | end | |
1175 | end)() | |
1176 | delay(4, function() | |
1177 | paralyzed = false | |
1178 | hum.WalkSpeed = hum.WalkSpeed + asd | |
1179 | end) | |
1180 | end | |
1181 | ||
1182 | elseif(Type == 'Knockdown' and GetTorso(who))then | |
1183 | local rek = GetTorso(who) | |
1184 | hum.PlatformStand = true | |
1185 | delay(1,function() | |
1186 | hum.PlatformStand = false | |
1187 | end) | |
1188 | local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit | |
1189 | local bodvol = NewInstance("BodyVelocity",rek,{ | |
1190 | velocity = angle * Knock, | |
1191 | P = 5000, | |
1192 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
1193 | }) | |
1194 | local rl = NewInstance("BodyAngularVelocity",rek,{ | |
1195 | P = 3000, | |
1196 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
1197 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
1198 | }) | |
1199 | game:GetService("Debris"):AddItem(bodvol, .5) | |
1200 | game:GetService("Debris"):AddItem(rl, .5) | |
1201 | end | |
1202 | end | |
1203 | end | |
1204 | end | |
1205 | end | |
1206 | end | |
1207 | end | |
1208 | ||
1209 | function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult) | |
1210 | for _,v in next, getRegion(where,range,{Char}) do | |
1211 | if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then | |
1212 | coroutine.wrap(function() for i = 1, M.RNG(minDam,maxDam) do swait() DealDamage(v.Parent,1,1,Knock,Type,0,1) end end)() | |
1213 | end | |
1214 | end | |
1215 | end | |
1216 | ||
1217 | function AOEHeal(where,range,amount) | |
1218 | local healed = {} | |
1219 | for _,v in next, getRegion(where,range,{Char}) do | |
1220 | local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil) | |
1221 | if(hum and not healed[hum])then | |
1222 | hum.Health = hum.Health + amount | |
1223 | if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then | |
1224 | 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) | |
1225 | end | |
1226 | end | |
1227 | end | |
1228 | end | |
1229 | ||
1230 | function CamShake(who,times,intense,origin) | |
1231 | coroutine.wrap(function() | |
1232 | if(script:FindFirstChild'CamShake')then | |
1233 | local cam = script.CamShake:Clone() | |
1234 | cam:WaitForChild'intensity'.Value = intense | |
1235 | cam:WaitForChild'times'.Value = times | |
1236 | ||
1237 | if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end | |
1238 | cam.Parent = who | |
1239 | wait() | |
1240 | cam.Disabled = false | |
1241 | elseif(who == Plr or who == Char)then | |
1242 | local intensity = intense | |
1243 | local cam = workspace.CurrentCamera | |
1244 | for i = 1, times do | |
1245 | local camDistFromOrigin | |
1246 | if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then | |
1247 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25 | |
1248 | elseif(typeof(origin) == 'Vector3')then | |
1249 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25 | |
1250 | end | |
1251 | if(camDistFromOrigin)then | |
1252 | intensity = math.min(intense, math.floor(intense/camDistFromOrigin)) | |
1253 | end | |
1254 | cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4) | |
1255 | swait() | |
1256 | end | |
1257 | end | |
1258 | end)() | |
1259 | end | |
1260 | ||
1261 | function CamShakeAll(times,intense,origin) | |
1262 | for _,v in next, Plrs:players() do | |
1263 | CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin) | |
1264 | end | |
1265 | end | |
1266 | ||
1267 | function ServerScript(code) | |
1268 | if(script:FindFirstChild'Loadstring')then | |
1269 | local load = script.Loadstring:Clone() | |
1270 | load:WaitForChild'Sauce'.Value = code | |
1271 | load.Disabled = false | |
1272 | load.Parent = workspace | |
1273 | elseif(NS and typeof(NS) == 'function')then | |
1274 | NS(code,workspace) | |
1275 | else | |
1276 | warn("no serverscripts lol") | |
1277 | end | |
1278 | end | |
1279 | ||
1280 | function LocalOnPlayer(who,code) | |
1281 | ServerScript([[ | |
1282 | wait() | |
1283 | script.Parent=nil | |
1284 | if(not _G.Http)then _G.Http = game:service'HttpService' end | |
1285 | ||
1286 | local Http = _G.Http or game:service'HttpService' | |
1287 | ||
1288 | local source = ]].."[["..code.."]]"..[[ | |
1289 | local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php" | |
1290 | local asd = Http:PostAsync(link,source) | |
1291 | repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID | |
1292 | local ID = Http:JSONDecode(asd).Result.Require_ID | |
1293 | local vs = require(ID).VORTH_SCRIPT | |
1294 | vs.Parent = game:service'Players'.]]..who.Name..[[.Character | |
1295 | ]]) | |
1296 | end | |
1297 | ||
1298 | ||
1299 | --// Attack Functions \\-- | |
1300 | function Laser(key) | |
1301 | NeutralAnims = false | |
1302 | Attack = true | |
1303 | Root.Anchored = true | |
1304 | local data = MagicCircle{Weld=Torso,Pos=CF.N(0,0,-4),Size=5,Variant=MagicVariant,Time=.5} | |
1305 | local IsGrown = false | |
1306 | data.Grown:connect(function() IsGrown = true end) | |
1307 | repeat swait() | |
1308 | local Alpha = .1 | |
1309 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(125),0,0),Alpha) | |
1310 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(125),0,0),Alpha) | |
1311 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
1312 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1313 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
1314 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
1315 | local LookVector = Mouse.Hit.p | |
1316 | Torso.CFrame = CF.N(Root.Position,LookVector) | |
1317 | until IsGrown | |
1318 | if(S.UserInputService:IsKeyDown(key))then | |
1319 | local grown = 0 | |
1320 | repeat | |
1321 | local Alpha = .1 | |
1322 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(125),0,0),Alpha) | |
1323 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(125),0,0),Alpha) | |
1324 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
1325 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1326 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
1327 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
1328 | local LookVector = Mouse.Hit.p | |
1329 | Root.CFrame = CF.N(Root.Position,LookVector) | |
1330 | if(grown < 250)then | |
1331 | data.Grow(.05) | |
1332 | grown = grown + 1 | |
1333 | end | |
1334 | swait() | |
1335 | until not S.UserInputService:IsKeyDown(key) | |
1336 | end | |
1337 | Sound(data.Circle,340722848,1,1,false,true,true) | |
1338 | local hit,pos,norm,dist = CastRay(data.Circle.CFrame.p,Mouse.Hit.p,1024) | |
1339 | local part = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data.Mesh.Scale.x/40,data.Mesh.Scale.x/40),CF.N(data.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false) | |
1340 | Mesh(part,Enum.MeshType.Cylinder) | |
1341 | Tween(part,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false) | |
1342 | Effect{ | |
1343 | Effect='ResizeAndFade', | |
1344 | Color=MagicVariant.Color, | |
1345 | Size=V3.N(data.Mesh.Scale.X/20,data.Mesh.Scale.X/20,data.Mesh.Scale.X/20), | |
1346 | Mesh={MeshType=Enum.MeshType.Sphere}, | |
1347 | CFrame=CF.N(pos), | |
1348 | FXSettings={ | |
1349 | EndSize=V3.N(.05,.05,.05), | |
1350 | EndIsIncrement=true | |
1351 | } | |
1352 | } | |
1353 | for i = 1, 5 do | |
1354 | local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)) | |
1355 | Effect{ | |
1356 | Effect='Fade', | |
1357 | Frames=65, | |
1358 | Size=V3.N((data.Mesh.Scale.X/20)/2,(data.Mesh.Scale.X/20)/2,data.Mesh.Scale.X/20), | |
1359 | CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data.Mesh.Scale.X/20)).p,pos), | |
1360 | Mesh = {MeshType=Enum.MeshType.Sphere}, | |
1361 | Material=Enum.Material.Neon, | |
1362 | Color=MagicVariant.Color, | |
1363 | MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p, | |
1364 | } | |
1365 | end | |
1366 | AOEDamage(pos,data.Mesh.Scale.X/20,15,45,0,'Normal',10,4) | |
1367 | coroutine.wrap(function() | |
1368 | local frame = (1/30) | |
1369 | for i = 1, 30 do | |
1370 | part.Transparency = (i/30) | |
1371 | swait() | |
1372 | end | |
1373 | part:destroy() | |
1374 | end)() | |
1375 | Attack = false | |
1376 | NeutralAnims = true | |
1377 | Root.Anchored = false | |
1378 | data.Destroy() | |
1379 | end | |
1380 | ||
1381 | function Balls(key) | |
1382 | NeutralAnims = false | |
1383 | Attack = true | |
1384 | Root.Anchored = true | |
1385 | local data = MagicCircle{Weld=Torso,Pos=CF.N(0,0,-1),Size=5,Variant=MagicVariant,Time=.5} | |
1386 | local IsGrown = false | |
1387 | data.Grown:connect(function() IsGrown = true end) | |
1388 | repeat swait() | |
1389 | local Alpha = .1 | |
1390 | local idk = M.R(25) | |
1391 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
1392 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
1393 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
1394 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1395 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
1396 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
1397 | local LookVector = Mouse.Hit.p | |
1398 | Torso.CFrame = CF.N(Root.Position,LookVector) | |
1399 | until IsGrown | |
1400 | local projectiles = 5 | |
1401 | if(S.UserInputService:IsKeyDown(key))then | |
1402 | local grown = 0 | |
1403 | repeat | |
1404 | local Alpha = .1 | |
1405 | local idk = M.R(25) | |
1406 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
1407 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
1408 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
1409 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1410 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
1411 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
1412 | local LookVector = Mouse.Hit.p | |
1413 | Root.CFrame = CF.N(Root.Position,LookVector) | |
1414 | if(grown < 250)then | |
1415 | data.Grow(.05) | |
1416 | grown = grown + 1 | |
1417 | projectiles = projectiles + .05 | |
1418 | end | |
1419 | swait() | |
1420 | until not S.UserInputService:IsKeyDown(key) | |
1421 | end | |
1422 | for i = 1, math.floor(projectiles) do | |
1423 | data.Grow(-math.floor(projectiles)/20) | |
1424 | local LookVector = Mouse.Hit.p | |
1425 | Root.CFrame = CF.N(Root.Position,LookVector) | |
1426 | ShootBullet{Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10} | |
1427 | swait(1) | |
1428 | end | |
1429 | ||
1430 | Attack = false | |
1431 | NeutralAnims = true | |
1432 | Root.Anchored = false | |
1433 | data.Destroy() | |
1434 | end | |
1435 | ||
1436 | function DLaser(key) | |
1437 | NeutralAnims = false | |
1438 | Attack = true | |
1439 | Root.Anchored = true | |
1440 | local data1 = MagicCircle{Weld=Torso,Pos=CF.N(-4,0,-4),Size=5,Variant=MagicVariant,Time=.5} | |
1441 | local data2 = MagicCircle{Weld=Torso,Pos=CF.N(4,0,-4),Size=5,Variant=MagicVariant,Time=.5} | |
1442 | local IsGrown = false | |
1443 | data1.Grown:connect(function() IsGrown = true end) | |
1444 | repeat swait() | |
1445 | local Alpha = .1 | |
1446 | local idk = M.R(25) | |
1447 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
1448 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
1449 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
1450 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1451 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
1452 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
1453 | local LookVector = Mouse.Hit.p | |
1454 | Torso.CFrame = CF.N(Root.Position,LookVector) | |
1455 | until IsGrown | |
1456 | if(S.UserInputService:IsKeyDown(key))then | |
1457 | local grown = 0 | |
1458 | repeat | |
1459 | local Alpha = .1 | |
1460 | local idk = M.R(25) | |
1461 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
1462 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
1463 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
1464 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1465 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
1466 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
1467 | local LookVector = Mouse.Hit.p | |
1468 | Root.CFrame = CF.N(Root.Position,LookVector) | |
1469 | if(grown < 250)then | |
1470 | data1.Grow(.05) | |
1471 | data2.Grow(.05) | |
1472 | grown = grown + 1 | |
1473 | end | |
1474 | swait() | |
1475 | until not S.UserInputService:IsKeyDown(key) | |
1476 | end | |
1477 | Sound(data1.Circle,340722848,1,1,false,true,true) | |
1478 | Sound(data2.Circle,340722848,1,1,false,true,true) | |
1479 | local hit,pos,norm,dist = CastRay(data1.Circle.CFrame.p,Mouse.Hit.p,1024) | |
1480 | local part1 = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data1.Mesh.Scale.x/40,data1.Mesh.Scale.x/40),CF.N(data1.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false) | |
1481 | Mesh(part1,Enum.MeshType.Cylinder) | |
1482 | ||
1483 | ||
1484 | local part2 = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data2.Mesh.Scale.x/40,data2.Mesh.Scale.x/40),CF.N(data2.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false) | |
1485 | Mesh(part2,Enum.MeshType.Cylinder) | |
1486 | Tween(part1,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false) | |
1487 | Tween(part2,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false) | |
1488 | Effect{ | |
1489 | Effect='ResizeAndFade', | |
1490 | Color=MagicVariant.Color, | |
1491 | Size=V3.N(data1.Mesh.Scale.X/20,data1.Mesh.Scale.X/20,data1.Mesh.Scale.X/20), | |
1492 | Mesh={MeshType=Enum.MeshType.Sphere}, | |
1493 | CFrame=CF.N(pos), | |
1494 | FXSettings={ | |
1495 | EndSize=V3.N(.05,.05,.05), | |
1496 | EndIsIncrement=true | |
1497 | } | |
1498 | } | |
1499 | for i = 1, 5 do | |
1500 | local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)) | |
1501 | Effect{ | |
1502 | Effect='Fade', | |
1503 | Frames=65, | |
1504 | Size=V3.N((data1.Mesh.Scale.X/20)/2,(data1.Mesh.Scale.X/20)/2,data1.Mesh.Scale.X/20), | |
1505 | CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data1.Mesh.Scale.X/20)).p,pos), | |
1506 | Mesh = {MeshType=Enum.MeshType.Sphere}, | |
1507 | Material=Enum.Material.Neon, | |
1508 | Color=MagicVariant.Color, | |
1509 | MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p, | |
1510 | } | |
1511 | end | |
1512 | AOEDamage(pos,data1.Mesh.Scale.X/20,15,45,0,'Normal',10,4) | |
1513 | AOEDamage(pos,data2.Mesh.Scale.X/20,15,45,0,'Normal',10,4) | |
1514 | coroutine.wrap(function() | |
1515 | local frame = (1/30) | |
1516 | for i = 1, 30 do | |
1517 | part1.Transparency = (i/30) | |
1518 | part2.Transparency = (i/30) | |
1519 | swait() | |
1520 | end | |
1521 | part1:destroy() | |
1522 | part2:destroy() | |
1523 | end)() | |
1524 | Attack = false | |
1525 | NeutralAnims = true | |
1526 | Root.Anchored = false | |
1527 | data1.Destroy() | |
1528 | data2.Destroy() | |
1529 | end | |
1530 | ||
1531 | ||
1532 | function BLaser(key) | |
1533 | NeutralAnims = false | |
1534 | Attack = true | |
1535 | Root.Anchored = true | |
1536 | local data = MagicCircle{Weld=Torso,Pos=CF.N(0,0,-1),Size=15,Variant=MagicVariant,Time=.75} | |
1537 | local IsGrown = false | |
1538 | data.Grown:connect(function() IsGrown = true end) | |
1539 | repeat swait() | |
1540 | local Alpha = .1 | |
1541 | local idk = M.R(25) | |
1542 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
1543 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
1544 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
1545 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1546 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
1547 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
1548 | local LookVector = Mouse.Hit.p | |
1549 | Torso.CFrame = CF.N(Root.Position,LookVector) | |
1550 | until IsGrown | |
1551 | if(S.UserInputService:IsKeyDown(key))then | |
1552 | local grown = 0 | |
1553 | repeat | |
1554 | local Alpha = .1 | |
1555 | local idk = M.R(25) | |
1556 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
1557 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
1558 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
1559 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1560 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
1561 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
1562 | local LookVector = Mouse.Hit.p | |
1563 | Root.CFrame = CF.N(Root.Position,LookVector) | |
1564 | swait() | |
1565 | until not S.UserInputService:IsKeyDown(key) | |
1566 | end | |
1567 | ||
1568 | local hit,pos,norm,dist = CastRay(data.Circle.CFrame.p,Mouse.Hit.p,1024) | |
1569 | local part = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data.Mesh.Scale.x/40,data.Mesh.Scale.x/40),CF.N(data.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false) | |
1570 | Mesh(part,Enum.MeshType.Cylinder) | |
1571 | Tween(part,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false) | |
1572 | local aa = data.Circle:Clone(); | |
1573 | aa.Parent = Effects | |
1574 | aa.Anchored = true | |
1575 | local blast = Sound(aa,334702766,1,5,false,true,true) | |
1576 | data.Circle:destroy() | |
1577 | if(not blast.IsLoaded)then repeat swait() until blast.IsLoaded end | |
1578 | Effect{ | |
1579 | Effect='ResizeAndFade', | |
1580 | Color=MagicVariant.Color, | |
1581 | Size=V3.N(data.Mesh.Scale.X/20,data.Mesh.Scale.X/20,data.Mesh.Scale.X/20), | |
1582 | Mesh={MeshType=Enum.MeshType.Sphere}, | |
1583 | CFrame=CF.N(pos), | |
1584 | Sound=blast, | |
1585 | FXSettings={ | |
1586 | EndSize=V3.N(.05,.05,.05), | |
1587 | EndIsIncrement=true | |
1588 | } | |
1589 | } | |
1590 | for i = 1, 5 do | |
1591 | local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)) | |
1592 | Effect{ | |
1593 | Effect='Fade', | |
1594 | Frames=65, | |
1595 | Sound=blast, | |
1596 | Size=V3.N((data.Mesh.Scale.X/20)/2,(data.Mesh.Scale.X/20)/2,data.Mesh.Scale.X/20), | |
1597 | CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data.Mesh.Scale.X/20)).p,pos), | |
1598 | Mesh = {MeshType=Enum.MeshType.Sphere}, | |
1599 | Material=Enum.Material.Neon, | |
1600 | Color=MagicVariant.Color, | |
1601 | MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p, | |
1602 | } | |
1603 | end | |
1604 | AOEDamage(pos,data.Mesh.Scale.X/20,45,75,0,'Normal',10,4) | |
1605 | coroutine.wrap(function() | |
1606 | for i = 1, (blast.TimeLength*Frame_Speed) do | |
1607 | part.Transparency = (i/(blast.TimeLength*Frame_Speed)) | |
1608 | for _,v in next, aa:children() do if v:IsA'Decal' then v.Transparency = (i/(blast.TimeLength*Frame_Speed)) end end | |
1609 | swait() | |
1610 | end | |
1611 | aa:destroy() | |
1612 | part:destroy() | |
1613 | end)() | |
1614 | ||
1615 | Attack = false | |
1616 | NeutralAnims = true | |
1617 | Root.Anchored = false | |
1618 | Root.Velocity = Mouse.Hit.lookVector*-125 | |
1619 | end | |
1620 | ||
1621 | function Skill1() | |
1622 | Laser(Enum.KeyCode.Q) | |
1623 | end | |
1624 | ||
1625 | function Skill2() | |
1626 | DLaser(Enum.KeyCode.Z) | |
1627 | end | |
1628 | ||
1629 | function Skill3() | |
1630 | BLaser(Enum.KeyCode.X) | |
1631 | end | |
1632 | ||
1633 | --// Wrap it all up \\-- | |
1634 | ||
1635 | Mouse.KeyDown:connect(function(k) | |
1636 | if(Attack)then return end | |
1637 | if(k == 'q')then Skill1() end | |
1638 | if(k == 'z')then Skill2() end | |
1639 | if(k == 'x')then Skill3() end | |
1640 | end) | |
1641 | ||
1642 | Plr.Chatted:connect(function(m) | |
1643 | ||
1644 | if(m:sub(1,3) == '/e ')then | |
1645 | local msg = m:sub(4) | |
1646 | --emote commands (gotta do) | |
1647 | end | |
1648 | end) | |
1649 | while true do | |
1650 | swait() | |
1651 | Sine = Sine + Change | |
1652 | ||
1653 | 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) | |
1654 | ||
1655 | local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1) | |
1656 | 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 (Hum.WalkSpeed > 24 and "Run" or "Walk") or hitfloor and "Idle") | |
1657 | if(not Effects or not Effects.Parent)then | |
1658 | Effects = IN("Model",Char) | |
1659 | Effects.Name = "Effects" | |
1660 | end | |
1661 | if(State == 'Run')then | |
1662 | local wsVal = 20 / (Hum.WalkSpeed/16) | |
1663 | local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1) | |
1664 | Change = 3 | |
1665 | 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(15+25*M.C(Sine/wsVal))+-M.S(Sine/wsVal),0,0),Alpha) | |
1666 | 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(15-25*M.C(Sine/wsVal))+M.S(Sine/wsVal),0,0),Alpha) | |
1667 | elseif(State == 'Walk')then | |
1668 | local wsVal = 20 / (Hum.WalkSpeed/16) | |
1669 | local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1) | |
1670 | Change = 3 | |
1671 | RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.5*M.C(Sine/wsVal)/2,0+.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/2.5,0,0),Alpha) | |
1672 | LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.5*M.C(Sine/wsVal)/2,0-.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0),Alpha) | |
1673 | else | |
1674 | RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2) | |
1675 | LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2) | |
1676 | end | |
1677 | ||
1678 | Hum.WalkSpeed = WalkSpeed | |
1679 | ||
1680 | if(NeutralAnims)then | |
1681 | if(State == 'Idle')then | |
1682 | local Alpha = .1 | |
1683 | Change = .75 | |
1684 | RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0+.2*M.C(Sine/12),.2*M.C(Sine/6),0)*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha) | |
1685 | NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha) | |
1686 | LS.C0 = LS.C0:lerp(LSC0*CF.N(.25,0,0)*CF.A(M.R(-45),0,M.R(45+5*M.C(Sine/12))),Alpha) | |
1687 | RS.C0 = RS.C0:lerp(RSC0*CF.N(-.25,0,0)*CF.A(M.R(-45),0,M.R(-45-5*M.C(Sine/12))),Alpha) | |
1688 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0-.2*M.C(Sine/12),-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(10),0),Alpha) | |
1689 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0-.2*M.C(Sine/12),-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(-10),0),Alpha) | |
1690 | -- idle | |
1691 | elseif(State == 'Run')then | |
1692 | local wsVal = 20 / (Hum.WalkSpeed/16) | |
1693 | local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1) | |
1694 | RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15+2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha) | |
1695 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1696 | 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)),Alpha) | |
1697 | 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)),Alpha) | |
1698 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
1699 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
1700 | elseif(State == 'Walk')then | |
1701 | local wsVal = 20 / (Hum.WalkSpeed/16) | |
1702 | local Alpha = math.min(.3 * (Hum.WalkSpeed/16),1) | |
1703 | RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-5-2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha) | |
1704 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
1705 | LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,-.22*M.C(Sine/wsVal))*CF.A(M.R(37*M.C(Sine/wsVal)),0,M.R(-5)),Alpha) | |
1706 | RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,.22*M.C(Sine/wsVal))*CF.A(M.R(-37*M.C(Sine/wsVal)),0,M.R(5)),Alpha) | |
1707 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
1708 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
1709 | elseif(State == 'Jump')then | |
1710 | local Alpha = .1 | |
1711 | local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90)) | |
1712 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha) | |
1713 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha) | |
1714 | RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
1715 | NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
1716 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
1717 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
1718 | elseif(State == 'Fall')then | |
1719 | local Alpha = .1 | |
1720 | local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90)) | |
1721 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
1722 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
1723 | RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
1724 | NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
1725 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
1726 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
1727 | elseif(State == 'Paralyzed')then | |
1728 | -- paralyzed | |
1729 | elseif(State == 'Sit')then | |
1730 | -- sit | |
1731 | end | |
1732 | end | |
1733 | ||
1734 | end |