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