SHOW:
|
|
- or go back to the newest paste.
1 | - | local armmovments = false |
1 | + | --https://github.com/Mokiros/roblox-FE-compatibility |
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,Mouse,mouse,UserInputService,ContextActionService = owner | |
4 | local RealPlayer = Player | |
5 | do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end local armmovments = false | |
6 | local plr = game:GetService('Players').LocalPlayer | |
7 | local chr = plr.Character | |
8 | local maus = plr:GetMouse() | |
9 | local PGui=plr.PlayerGui | |
10 | local lleg = chr["Left Leg"] | |
11 | local rleg = chr["Right Leg"] | |
12 | local larm = chr["Left Arm"] | |
13 | local rarm = chr["Right Arm"] | |
14 | local hed = chr.Head | |
15 | local rutprt = chr.HumanoidRootPart | |
16 | local torso = chr.Torso | |
17 | local otheranims=false | |
18 | local swimming=false | |
19 | chr.Animate.Disabled=true | |
20 | local fldb={['w']=false,['a']=false,['s']=false,['d']=false} | |
21 | local RunSpeed=50 | |
22 | local WlkSpeed=30 | |
23 | local SwimSpeed=14 | |
24 | local SwimDashSpeed=28 | |
25 | local anim = "Idling" | |
26 | local lastanim = "Idling" | |
27 | local val = 0 | |
28 | local syne = 0 | |
29 | local num = 0 | |
30 | local runtime = 0 | |
31 | local pseudohead=hed:Clone() | |
32 | for i,x in pairs(pseudohead:GetChildren()) do if not x.ClassName:find('Mesh') then x:Destroy() end end | |
33 | pseudohead.Name='PseudoHead' | |
34 | pseudohead.Parent=chr.Head | |
35 | local pseudoweld=Instance.new('Weld',torso) | |
36 | pseudoweld.Part0=hed | |
37 | pseudoweld.Name='PseudoHedWld' | |
38 | pseudoweld.Part1=pseudohead | |
39 | hed.Transparency=1 | |
40 | local Player = game:GetService('Players').LocalPlayer | |
41 | local Character = Player.Character | |
42 | local Mouse = Player:GetMouse() | |
43 | local LeftArm = Character:WaitForChild("Left Arm") | |
44 | local RightArm = Character:WaitForChild("Right Arm") | |
45 | local LeftLeg = Character:WaitForChild("Left Leg") | |
46 | local RightLeg = Character:WaitForChild("Right Leg") | |
47 | local Head = Character:WaitForChild("Head") | |
48 | local Torso = Character:WaitForChild("Torso") | |
49 | z = Instance.new("Sound", torso) | |
50 | z.SoundId = "rbxassetid://" -- Put Music ID Here. | |
51 | z.Looped = true | |
52 | z.Pitch = 0.82 | |
53 | z.Volume = 1 | |
54 | wait(.1) | |
55 | z:Play() | |
56 | local RootPart = Character:WaitForChild("HumanoidRootPart") | |
57 | local Humanoid = Character:WaitForChild("Humanoid") | |
58 | local LeftShoulder = Torso:WaitForChild("Left Shoulder") | |
59 | local RightShoulder = Torso:WaitForChild("Right Shoulder") | |
60 | local LeftHip = Torso:WaitForChild("Left Hip") | |
61 | local RightHip = Torso:WaitForChild("Right Hip") | |
62 | local Neck = Torso:WaitForChild("Neck") | |
63 | local RootJoint = RootPart:WaitForChild("RootJoint") | |
64 | local Camera = workspace.CurrentCamera | |
65 | local FLeftShoulder, FRightShoulder = Instance.new("Weld", Torso), Instance.new("Weld", Torso) | |
66 | FLeftShoulder.Name = "LS" | |
67 | FRightShoulder.Name = "RS" | |
68 | local FLeftHip, FRightHip = Instance.new("Weld", Torso), Instance.new("Weld", Torso) | |
69 | FLeftHip.Name = "LH" | |
70 | FRightHip.Name = "RH" | |
71 | local FRootJoint = Instance.new("Weld", RootPart) | |
72 | FRootJoint.Name = "RJ" | |
73 | local F1, F2, F3 = Instance.new("Folder", Character), Instance.new("Folder"), Instance.new("Folder") | |
74 | F1.Name = "Parts Folder" | |
75 | F2.Parent = F1 | |
76 | F2.Name = "Effects" | |
77 | F3.Parent = F1 | |
78 | F3.Name = "Extra Parts" | |
79 | local Drag_To_Part = Instance.new("Part", F3) | |
80 | Drag_To_Part.Transparency = 1 | |
81 | Drag_To_Part.Name = "Drag-to-part" | |
82 | Drag_To_Part.Size = Vector3.new(0.2, 0.2, 0.2) | |
83 | Drag_To_Part.Anchored = false | |
84 | Drag_To_Part.CanCollide = false | |
85 | Drag_To_Part.Locked = true | |
86 | local DTPWeld = Instance.new("Weld", Drag_To_Part) | |
87 | DTPWeld.Part0 = RootPart | |
88 | DTPWeld.Part1 = Drag_To_Part | |
89 | local WepWeld, WepWeld2, WepWeld3, SheWeld = nil, nil, nil, nil | |
90 | local NLSC0 = LeftShoulder.C0 | |
91 | local NLSC1 = LeftShoulder.C1 | |
92 | local NRSC0 = RightShoulder.C0 | |
93 | local NRSC1 = RightShoulder.C1 | |
94 | local NLHC0 = LeftHip.C0 | |
95 | local NLHC1 = LeftHip.C1 | |
96 | local NRHC0 = RightHip.C0 | |
97 | local NRHC1 = RightHip.C1 | |
98 | local NNC0 = Neck.C0 | |
99 | local NNC1 = Neck.C1 | |
100 | local NRJC0 = RootJoint.C0 | |
101 | local NRJC1 = RootJoint.C1 | |
102 | local Handle, Hit_Box, Handle2, Hit_Box2, TEHandle, TESHandle, TEHit_Box, CEP = nil, nil, nil, nil, nil, nil, nil, nil | |
103 | local chatServ = game:GetService("Chat") | |
104 | local runServ = game:GetService("RunService") | |
105 | local debServ = game:GetService("Debris") | |
106 | local CurrentSpeed = 16 | |
107 | local Current_Anim = "Idle" | |
108 | local Attack_Num = 1 | |
109 | local Damage_Buff = 0 | |
110 | local Max_Health = 400 | |
111 | local Last_Health = Max_Health | |
112 | local idle = 1 | |
113 | local idlenum = 1 | |
114 | local idlenum2 = 1 | |
115 | local walk = 1 | |
116 | local walknum = 1 | |
117 | local walknum2 = 1 | |
118 | local Effects = {} | |
119 | local DragTable = {} | |
120 | local InputTable = {} | |
121 | local InputFrameTable = {} | |
122 | local TEBladeP = {} | |
123 | local TEBEffect, c1, c2 = nil, nil, nil | |
124 | local RGyro = Instance.new("BodyGyro") | |
125 | - | local ControlScript = Player.PlayerScripts:WaitForChild("ControlScript") |
125 | + | |
126 | RGyro.P = 2000 | |
127 | local LLCF = CFrame.new() | |
128 | local SWP = Instance.new("BoolValue") | |
129 | local ControlScript = Player.timetodie23232223:WaitForChild("ControlScript") | |
130 | local Z_Pressed = false | |
131 | local Debounces = {Equipped = false, Equipping = false, HasWep = false, DuelWielding = false, Attacking = false, Locked_On = false, Can_Double_Jump = false, AnimOverride = false, Guarding = false, Crouching = false, JumpAnim = false, DoubleJumpAnim = false, KeyStrokeEnabled = false, Successful_KeyStroke = false, KeyStroke_CoolDown = false, UIAction = false, ZeroGravity = false, DoubleJumping = false, Charging_Erupt = false, Guarding = false, Transformed = false, DisableJump = false, Dashing = false, Hovering = false, TEWield = false, TESWield = false, CanGuard = true, SpedUp = false, HurrSlash = false, Stompped = false} | |
132 | local rad = math.rad | |
133 | local huge = math.huge | |
134 | local rand = math.random | |
135 | local Vec = Vector3.new | |
136 | local Cf = CFrame.new | |
137 | local Euler = CFrame.fromEulerAnglesXYZ | |
138 | local BC = BrickColor.new | |
139 | local Col3 = Color3.new | |
140 | local Inst = Instance.new | |
141 | local Ud2 = UDim2.new | |
142 | ||
143 | ||
144 | ||
145 | local FONT = "SourceSansLight" | |
146 | ||
147 | ||
148 | MakeText = function(text, font, duration, tcr, tcg, tcb, scr, scg, scb, cFrame) | |
149 | local tpart = Instance.new("Part") | |
150 | tpart.Parent = F2 | |
151 | tpart.Transparency = 1 | |
152 | tpart.Name = "hoi hoi" | |
153 | tpart.Anchored = true | |
154 | tpart.CanCollide = false | |
155 | tpart.Locked = true | |
156 | tpart.Size = Vector3.new(0.2, 0.2, 0.2) | |
157 | tpart.CFrame = cFrame * CFrame.new(math.random(-2, 2), 0, math.random(-2, 2)) | |
158 | local bill = Instance.new("BillboardGui") | |
159 | bill.Parent = tpart | |
160 | bill.AlwaysOnTop = true | |
161 | bill.Name = "HUHHHHHNAAAA" | |
162 | bill.Size = UDim2.new(4, 0, 4, 0) | |
163 | bill.StudsOffset = Vector3.new(0, 1, 0) | |
164 | local counter = 0 | |
165 | local textl = Instance.new("TextLabel") | |
166 | textl.Parent = bill | |
167 | textl.Name = "WHYYYYYYYY" | |
168 | textl.BackgroundTransparency = 1 | |
169 | textl.Size = UDim2.new(1, 0, 1, 0) | |
170 | textl.Font = font | |
171 | textl.Text = text | |
172 | textl.TextColor3 = Color3.new(tcr / 255, tcg / 255, tcb / 255) | |
173 | textl.TextScaled = true | |
174 | textl.TextStrokeColor3 = Color3.new(scr / 255, scg / 255, scb / 255) | |
175 | textl.TextStrokeTransparency = 0 | |
176 | coroutine.resume(coroutine.create(function() | |
177 | while textl.TextTransparency < 1 do | |
178 | swait() | |
179 | if bill.StudsOffset.Y >= 5 then | |
180 | if duration <= counter then | |
181 | textl.TextTransparency = textl.TextTransparency + 0.15 | |
182 | textl.TextStrokeTransparency = textl.TextStrokeTransparency + 0.15 | |
183 | end | |
184 | end | |
185 | counter = counter + 0.1 | |
186 | bill.StudsOffset = Vector3.new(0, bill.StudsOffset.Y + 0.15, 0) | |
187 | end | |
188 | debServ:AddItem(bill, 0) | |
189 | debServ:AddItem(textl, 0) | |
190 | debServ:AddItem(tpart, 0) | |
191 | end)) | |
192 | end | |
193 | ||
194 | Apply_Buff = function(amount, duration) | |
195 | ||
196 | coroutine.resume(coroutine.create(function() | |
197 | ||
198 | if amount > 0 and duration > 0 then | |
199 | Damage_Buff = Damage_Buff + amount | |
200 | MakeText("+" .. amount .. " Damage", FONT, 0.3, 255, 0, 0, 0, 0, 0, RootPart.CFrame) | |
201 | wait(duration) | |
202 | Damage_Buff = Damage_Buff - amount | |
203 | MakeText("-" .. amount .. " Damage", FONT, 0.3, 255, 0, 0, 0, 0, 0, RootPart.CFrame) | |
204 | end | |
205 | end | |
206 | )) | |
207 | end | |
208 | ||
209 | Apply_Health_Buff = function(amount, duration) | |
210 | ||
211 | coroutine.resume(coroutine.create(function() | |
212 | ||
213 | if amount > 0 and duration > 0 then | |
214 | Max_Health = Max_Health + amount | |
215 | coroutine.resume(coroutine.create(function() | |
216 | ||
217 | wait() | |
218 | Humanoid.Health = Humanoid.Health + amount | |
219 | end | |
220 | )) | |
221 | MakeText("+" .. amount .. " Max Health", FONT, 0.3, 255, 170, 0, 0, 0, 0, RootPart.CFrame) | |
222 | wait(duration) | |
223 | Max_Health = Max_Health - amount | |
224 | MakeText("-" .. amount .. " Max Health", FONT, 0.3, 255, 170, 0, 0, 0, 0, RootPart.CFrame) | |
225 | end | |
226 | end | |
227 | )) | |
228 | end | |
229 | ||
230 | ||
231 | FindHum = function(parent) | |
232 | ||
233 | local hm = nil | |
234 | for _,HM in pairs(parent:GetChildren()) do | |
235 | if HM:IsA("Humanoid") then | |
236 | hm = HM | |
237 | end | |
238 | end | |
239 | return hm | |
240 | end | |
241 | ||
242 | ||
243 | ArtificialHB = Instance.new("BindableEvent", script) | |
244 | ArtificialHB.Name = "Heartbeat" | |
245 | script:WaitForChild("Heartbeat") | |
246 | frame = 0.033333333333333 | |
247 | tf = 0 | |
248 | allowframeloss = false | |
249 | tossremainder = false | |
250 | lastframe = tick() | |
251 | script.Heartbeat:Fire() | |
252 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
253 | tf = tf + s | |
254 | if frame <= tf then | |
255 | if allowframeloss then | |
256 | script.Heartbeat:Fire() | |
257 | lastframe = tick() | |
258 | else | |
259 | for i = 1, math.floor(tf / frame) do | |
260 | script.Heartbeat:Fire() | |
261 | end | |
262 | lastframe = tick() | |
263 | end | |
264 | if tossremainder then | |
265 | tf = 0 | |
266 | else | |
267 | tf = tf - frame * math.floor(tf / frame) | |
268 | end | |
269 | end | |
270 | end | |
271 | ) | |
272 | swait = function(num) | |
273 | if num == 0 or num == nil then | |
274 | ArtificialHB.Event:wait() | |
275 | else | |
276 | for i = 0, num do | |
277 | ArtificialHB.Event:wait() | |
278 | end | |
279 | end | |
280 | end | |
281 | ||
282 | local DamageFunction = function(Hit, IsRan, MinDam, MaxDam, HKB, Knockback, DamType, Property, Duration, HDrag, DragDuration, SoEff, SoID, SoPit, SoVol) | |
283 | ||
284 | local humanoid = FindHum(Hit.Parent) | |
285 | if humanoid and humanoid ~= Humanoid then | |
286 | local IsSafe = true | |
287 | local Deb = humanoid:FindFirstChild("ChaosDebounce") | |
288 | if Deb then | |
289 | local Cre = Deb:FindFirstChild("Creator") | |
290 | if Cre and Cre.Value == Player.UserId then | |
291 | IsSafe = false | |
292 | end | |
293 | end | |
294 | if IsSafe then | |
295 | local deb = Inst("BoolValue", humanoid) | |
296 | deb.Name = "ChaosDebounce" | |
297 | local cre = Inst("NumberValue", deb) | |
298 | cre.Name = "Creator" | |
299 | cre.Value = Player.UserId | |
300 | debServ:AddItem(deb, Duration) | |
301 | debServ:AddItem(cre, Duration) | |
302 | local Damage = 1 | |
303 | if IsRan then | |
304 | Damage = rand(MinDam, MaxDam) | |
305 | else | |
306 | Damage = MaxDam | |
307 | end | |
308 | local this_nigga_had_op_health = false | |
309 | if SoEff then | |
310 | local HitSound = Sound(Hit, "http://roblox.com/asset/?id=" .. SoID .. "", SoVol, SoPit, false) | |
311 | debServ:AddItem(HitSound, 6) | |
312 | end | |
313 | -- DECOMPILER ERROR at PC100: Unhandled construct in 'MakeBoolean' P1 | |
314 | ||
315 | if (DamType == "Compensate" or string.sub(DamType, 1, 10) == "Compensate") and (humanoid.MaxHealth >= 100000 or humanoid.MaxHealth == 0) then | |
316 | if humanoid.MaxHealth >= 1000000000 or humanoid.MaxHealth == 0 then | |
317 | humanoid.MaxHealth = 100 | |
318 | this_nigga_had_op_health = true | |
319 | end | |
320 | Damage = Damage * (humanoid.MaxHealth / 100) | |
321 | end | |
322 | if humanoid.MaxHealth >= 100000000 or humanoid.MaxHealth == 0 then | |
323 | this_nigga_had_op_health = true | |
324 | humanoid.MaxHealth = 100 | |
325 | end | |
326 | if Damage_Buff > 0 then | |
327 | Damage = Damage * Damage_Buff | |
328 | end | |
329 | humanoid.Health = humanoid.Health - Damage | |
330 | if humanoid.MaxHealth / 4 <= Damage then | |
331 | MakeText("-" .. Damage .. "", "SourceSansBold", 0.3, 170, 0, 0, 255, 85, 0, Hit.CFrame) | |
332 | else | |
333 | local mtc = BrickColor.new("Really black").Color | |
334 | MakeText("-" .. Damage .. "", FONT, 0.3, mtc.r * 255, mtc.g * 255, mtc.b * 255, 0, 0, 0, Hit.CFrame) | |
335 | end | |
336 | do | |
337 | if HKB and (DamType ~= "SkyRocket" or DamType ~= "Compensate-SkyRocket") then | |
338 | if Property.Name ~= "Point" then | |
339 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
340 | local KBCF = Cf(Hit.Position, Property.Position) | |
341 | Hit.Velocity = KBCF.lookVector * -Knockback | |
342 | else | |
343 | do | |
344 | Hit.Velocity = Property.CFrame.lookVector * Knockback | |
345 | if (DamType == "Normal" and DamType == "Stun") or DamType == "Compensate-Stun" then | |
346 | MakeText("Stunned", FONT, 0.3, 255, 255, 0, 0, 0, 0, Hit.CFrame) | |
347 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
348 | local pos = Inst("BodyPosition", Hit) | |
349 | pos.MaxForce = Vec(huge, huge, huge) | |
350 | pos.Position = Hit.Position | |
351 | debServ:AddItem(pos, Duration * 10) | |
352 | else | |
353 | do | |
354 | if DamType == "LifeSteal" or DamType == "Compensate-LifeSteal" then | |
355 | Humanoid.Health = Humanoid.Health + Damage / 2 | |
356 | MakeText("+" .. Damage / 2, FONT, 0.4, 0, 0, 0, 0, 255, 0, RootPart.CFrame) | |
357 | else | |
358 | if DamType == "MomentumStopper" or DamType == "Compensate-MomentumStopper" then | |
359 | local vel = Inst("BodyVelocity", Hit) | |
360 | vel.Name = "MomentumStopper" | |
361 | vel.MaxForce = Vec(huge, huge, huge) | |
362 | vel.Velocity = Vec(0, 0, 0) | |
363 | debServ:AddItem(vel, 3) | |
364 | else | |
365 | do | |
366 | if DamType == "Knockdown" or DamType == "Compensate-Knockdown" then | |
367 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
368 | else | |
369 | if DamType == "SkyRocket" or DamType == "Compensate-SkyRocket" then | |
370 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
371 | Hit.Velocity = Vec(0, Knockback, 0) | |
372 | if rand(1, 4) == 1 then | |
373 | local Twista = Inst("BodyAngularVelocity", Hit) | |
374 | Twista.MaxTorque = Vec(1000000, 1000000, 1000000) | |
375 | Twista.AngularVelocity = Vec(rand(-2, 2) * (Knockback / 2), rand(-2, 2) * (Knockback / 2), rand(-2, 2) * (Knockback / 2)) | |
376 | debServ:AddItem(Twista, 0.01) | |
377 | end | |
378 | else | |
379 | do | |
380 | if DamType == "FreezeStun" or DamType == "Compensate-FreezeStun" then | |
381 | MakeText("Stunned", FONT, 0.3, 0, 0, 0, 255, 170, 0, Hit.CFrame) | |
382 | coroutine.resume(coroutine.create(function() | |
383 | ||
384 | local ti = 0 | |
385 | local hHead = Hit.Parent:FindFirstChild("Head") | |
386 | if hHead then | |
387 | hHead = Hit | |
388 | local h = Inst("Part", F2) | |
389 | h.Size = Vec(0.2, 0.2, 0.2) | |
390 | h.CanCollide = false | |
391 | h.Transparency = 1 | |
392 | h.Position = hHead.Position | |
393 | local hWELD = Inst("Weld", h) | |
394 | hWELD.Part0 = hHead | |
395 | hWELD.Part1 = h | |
396 | hWELD.C0 = Cf(0, -4, 0) | |
397 | repeat | |
398 | ti = ti + 0.1 | |
399 | for _,p in pairs(humanoid.Parent:GetChildren()) do | |
400 | if p:IsA("BasePart") then | |
401 | p.Anchored = true | |
402 | end | |
403 | end | |
404 | swait() | |
405 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
406 | local p1 = hHead.Position + Vec(rand(-200, 200) / 100, -(hHead.Size.y * 1.5), rand(-200, 200) / 100) | |
407 | local p0 = h.Position | |
408 | Lightning(p0, p1, 5, 3, "Deep orange", "Neon", 0.1, 0.2, 0.2) | |
409 | until Duration * 12 <= ti | |
410 | for _,p in pairs(humanoid.Parent:GetChildren()) do | |
411 | if p:IsA("BasePart") then | |
412 | p.Anchored = false | |
413 | end | |
414 | end | |
415 | debServ:AddItem(h, 0) | |
416 | end | |
417 | end | |
418 | )) | |
419 | else | |
420 | if DamType == "KnockDownFreezeStun" or DamType == "Compensate-KnockDownFreezeStun" then | |
421 | MakeText("Stunned", FONT, 0.3, 0, 0, 0, 255, 64, 0, Hit.CFrame) | |
422 | coroutine.resume(coroutine.create(function() | |
423 | ||
424 | local ti = 0 | |
425 | local scf = nil | |
426 | local h = Inst("Part", F2) | |
427 | h.Size = Vec(0.2, 0.2, 0.2) | |
428 | h.CanCollide = false | |
429 | h.Anchored = true | |
430 | h.Transparency = 1 | |
431 | h.Position = Hit.Position | |
432 | h.CFrame = h.CFrame * Euler(rad(-90), 0, 0) | |
433 | local IL = {Character, Hit.Parent} | |
434 | local Ground, Pos = workspace:FindPartOnRayWithIgnoreList(Ray.new(h.Position, h.CFrame.lookVector.Unit * 999), IL, true, true) | |
435 | if Ground then | |
436 | Hit.CFrame = Cf(Pos) * Euler(rad(-90), 0, 0) | |
437 | scf = Cf(Pos) * Euler(rad(-90), 0, 0) | |
438 | end | |
439 | repeat | |
440 | ti = ti + 0.1 | |
441 | for _,p in pairs(humanoid.Parent:GetChildren()) do | |
442 | if p:IsA("BasePart") then | |
443 | p.Anchored = true | |
444 | end | |
445 | end | |
446 | Hit.CFrame = scf | |
447 | swait() | |
448 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
449 | until Duration * 7 <= ti | |
450 | for _,p in pairs(humanoid.Parent:GetChildren()) do | |
451 | if p:IsA("BasePart") then | |
452 | p.Anchored = false | |
453 | end | |
454 | end | |
455 | debServ:AddItem(h, 0) | |
456 | end | |
457 | )) | |
458 | end | |
459 | end | |
460 | if HDrag then | |
461 | humanoid:ChangeState(Enum.HumanoidStateType.FallingDown) | |
462 | local pos = Inst("BodyPosition", Hit) | |
463 | pos.MaxForce = Vec(huge, huge, huge) | |
464 | pos.Position = Drag_To_Part.Position | |
465 | local d = Inst("NumberValue", pos) | |
466 | d.Name = "Duration" | |
467 | d.Value = DragDuration | |
468 | table.insert(DragTable, pos) | |
469 | end | |
470 | do | |
471 | if this_nigga_had_op_health then | |
472 | coroutine.resume(coroutine.create(function() | |
473 | ||
474 | swait() | |
475 | Damage = Damage * 2 | |
476 | humanoid.Health = humanoid.Health - Damage | |
477 | MakeText("-" .. Damage .. "", FONT, 0.4, 0, 0, 0, 0, 0, 91, Hit.CFrame) | |
478 | end | |
479 | )) | |
480 | end | |
481 | end | |
482 | end | |
483 | end | |
484 | end | |
485 | end | |
486 | end | |
487 | end | |
488 | end | |
489 | end | |
490 | end | |
491 | end | |
492 | end | |
493 | end | |
494 | end | |
495 | end | |
496 | end | |
497 | ||
498 | MagniDamage = function(Part, range, isRan, mindam, maxdam, hkb, knock, DType, dur, hd, dd, soe, soid, sopit, sovol) | |
499 | ||
500 | for _,c in pairs(workspace:GetChildren()) do | |
501 | local hum = FindHum(c) | |
502 | if hum and hum ~= Humanoid then | |
503 | local head = c:FindFirstChild("Head") | |
504 | local tor = c:FindFirstChild("Torso") | |
505 | local larm = c:FindFirstChild("Left Arm") | |
506 | local rarm = c:FindFirstChild("Right Arm") | |
507 | local lleg = c:FindFirstChild("Left Leg") | |
508 | local rleg = c:FindFirstChild("Right Leg") | |
509 | local Dis = range | |
510 | local Par = nil | |
511 | if head then | |
512 | local Mag = (head.Position - Part.Position).magnitude | |
513 | if Mag <= Dis then | |
514 | Dis = Mag | |
515 | Par = head | |
516 | end | |
517 | end | |
518 | if tor then | |
519 | local Mag = (tor.Position - Part.Position).magnitude | |
520 | if Mag <= Dis then | |
521 | Dis = Mag | |
522 | Par = tor | |
523 | end | |
524 | end | |
525 | if rarm then | |
526 | local Mag = (rarm.Position - Part.Position).magnitude | |
527 | if Mag <= Dis then | |
528 | Dis = Mag | |
529 | Par = rarm | |
530 | end | |
531 | end | |
532 | if larm then | |
533 | local Mag = (larm.Position - Part.Position).magnitude | |
534 | if Mag <= Dis then | |
535 | Dis = Mag | |
536 | Par = larm | |
537 | end | |
538 | end | |
539 | if rleg then | |
540 | local Mag = (rleg.Position - Part.Position).magnitude | |
541 | if Mag <= Dis then | |
542 | Dis = Mag | |
543 | Par = rleg | |
544 | end | |
545 | end | |
546 | if lleg then | |
547 | local Mag = (lleg.Position - Part.Position).magnitude | |
548 | if Mag <= Dis then | |
549 | Dis = Mag | |
550 | Par = lleg | |
551 | end | |
552 | end | |
553 | if Par then | |
554 | DamageFunction(Par, isRan, mindam, maxdam, hkb, knock, DType, Part, dur, hd, dd, soe, soid, sopit, sovol) | |
555 | end | |
556 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
557 | ||
558 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
559 | ||
560 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
561 | ||
562 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
563 | ||
564 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
565 | ||
566 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out DO_STMT | |
567 | ||
568 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out IF_THEN_STMT | |
569 | ||
570 | -- DECOMPILER ERROR at PC113: LeaveBlock: unexpected jumping out IF_STMT | |
571 | ||
572 | end | |
573 | end | |
574 | end | |
575 | ||
576 | ||
577 | ||
578 | ||
579 | ||
580 | ||
581 | CreatePart = function(className, parent, Brickcolor, Material, Transparency, Reflectance, Name, Size, Position, Rotation, MeshClass, MeshScale, MeshId, MeshType) | |
582 | ||
583 | local Part = Instance.new(className, parent) | |
584 | Part.BrickColor = BrickColor.new(Brickcolor) | |
585 | Part.Transparency = Transparency | |
586 | Part.Reflectance = Reflectance | |
587 | Part.Material = Material | |
588 | Part.Name = Name | |
589 | Part.Anchored = true | |
590 | Part.CanCollide = false | |
591 | Part.Locked = true | |
592 | Part.Size = Size | |
593 | Part.Position = Position | |
594 | Part.Rotation = Rotation | |
595 | Part.TopSurface = "SmoothNoOutlines" | |
596 | Part.BottomSurface = "SmoothNoOutlines" | |
597 | Part.FrontSurface = "SmoothNoOutlines" | |
598 | Part.BackSurface = "SmoothNoOutlines" | |
599 | Part.RightSurface = "SmoothNoOutlines" | |
600 | Part.LeftSurface = "SmoothNoOutlines" | |
601 | local Mesh = Instance.new(MeshClass, Part) | |
602 | Mesh.Scale = MeshScale | |
603 | if MeshClass == "SpecialMesh" then | |
604 | Mesh.MeshId = MeshId | |
605 | Mesh.MeshType = MeshType | |
606 | end | |
607 | return Part | |
608 | end | |
609 | ||
610 | ||
611 | ||
612 | rayCast = function(Pos, Dir, Max, Ignore) | |
613 | ||
614 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
615 | end | |
616 | ||
617 | local Point = Torso.CFrame * Cf(0, Torso.Size.Y, 0) | |
618 | LastPoint = Point | |
619 | effect = function(Color, Ref, LP, P1, returnn) | |
620 | ||
621 | local effectsmsh = Instance.new("CylinderMesh") | |
622 | effectsmsh.Scale = Vector3.new(0.2, 1, 0.2) | |
623 | effectsmsh.Name = "Mesh" | |
624 | local effectsg = Instance.new("Part") | |
625 | effectsg.formFactor = 3 | |
626 | effectsg.CanCollide = false | |
627 | effectsg.Name = "Eff" | |
628 | effectsg.Locked = true | |
629 | effectsg.Anchored = true | |
630 | effectsg.Size = Vector3.new(0.5, 1, 0.5) | |
631 | effectsg.Parent = F2 | |
632 | effectsmsh.Parent = effectsg | |
633 | effectsg.BrickColor = BrickColor.new(Color) | |
634 | effectsg.Reflectance = Ref | |
635 | local point1 = P1 | |
636 | local mg = (LP.p - point1.p).magnitude | |
637 | effectsg.Size = Vector3.new(0.5, mg, 0.5) | |
638 | effectsg.CFrame = Cf((LP.p + point1.p) / 2, point1.p) * CFrame.Angles(math.rad(90), 0, 0) | |
639 | effectsmsh.Scale = Vector3.new(0.2, 1, 0.2) | |
640 | game:GetService("Debris"):AddItem(effectsg, 2) | |
641 | if returnn then | |
642 | return effectsg | |
643 | end | |
644 | coroutine.resume(coroutine.create(function(Part, Mesh) | |
645 | ||
646 | if not returnn then | |
647 | for i = 0, 1, 0.05 do | |
648 | swait() | |
649 | Part.Transparency = 1 * i | |
650 | Mesh.Scale = Vector3.new(0.5 - 0.5 * i, 1, 0.5 - 0.5 * i) | |
651 | end | |
652 | Part.Parent = nil | |
653 | end | |
654 | end | |
655 | ), effectsg, effectsmsh) | |
656 | end | |
657 | ||
658 | local CFrameFromTopBack = function(at, top, back) | |
659 | ||
660 | local right = top:Cross(back) | |
661 | return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
662 | end | |
663 | ||
664 | NoOutline = function(Part) | |
665 | ||
666 | Part.TopSurface = 10 | |
667 | end | |
668 | ||
669 | pert = function(parent, reflectance, transparency, brickcolor, name, size, material) | |
670 | ||
671 | local fp = Inst("Part") | |
672 | fp.Parent = parent | |
673 | fp.Reflectance = reflectance | |
674 | fp.Transparency = transparency | |
675 | fp.CanCollide = false | |
676 | fp.Locked = true | |
677 | fp.BrickColor = brickcolor | |
678 | fp.Name = name | |
679 | fp.Size = size | |
680 | fp.Position = Torso.Position | |
681 | NoOutline(fp) | |
682 | fp.Material = material | |
683 | fp:BreakJoints() | |
684 | return fp | |
685 | end | |
686 | ||
687 | mesh = function(Mesh, part, meshtype, meshid, offset, scale) | |
688 | ||
689 | local mesh = Inst(Mesh) | |
690 | mesh.Parent = part | |
691 | if Mesh == "SpecialMesh" then | |
692 | mesh.MeshType = meshtype | |
693 | mesh.MeshId = meshid | |
694 | end | |
695 | mesh.Offset = offset | |
696 | mesh.Scale = scale | |
697 | return mesh | |
698 | end | |
699 | ||
700 | MagicBlock = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
701 | ||
702 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
703 | prt.Anchored = true | |
704 | prt.CFrame = cframe | |
705 | local msh = mesh("BlockMesh", prt, "", "", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
706 | game:GetService("Debris"):AddItem(prt, 5) | |
707 | table.insert(Effects, {prt, "Block1", Delay, x3, y3, z3}) | |
708 | end | |
709 | ||
710 | MagicBlock2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
711 | ||
712 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
713 | prt.Anchored = true | |
714 | prt.CFrame = cframe | |
715 | local msh = mesh("BlockMesh", prt, "", "", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
716 | game:GetService("Debris"):AddItem(prt, 5) | |
717 | table.insert(Effects, {prt, "Disappear", Delay, x3, y3, z3}) | |
718 | end | |
719 | ||
720 | MagicSpikeBall = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
721 | ||
722 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
723 | prt.Anchored = true | |
724 | prt.CFrame = cframe | |
725 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/Asset/?id=9982590", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
726 | game:GetService("Debris"):AddItem(prt, 5) | |
727 | table.insert(Effects, {prt, "Block1", Delay, x3, y3, z3}) | |
728 | end | |
729 | ||
730 | MagicCircle = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
731 | ||
732 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
733 | prt.Anchored = true | |
734 | prt.CFrame = cframe | |
735 | local msh = mesh("SpecialMesh", prt, "Sphere", "", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
736 | game:GetService("Debris"):AddItem(prt, 5) | |
737 | table.insert(Effects, {prt, "Cylinder", Delay, x3, y3, z3}) | |
738 | end | |
739 | ||
740 | MagicWave = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
741 | ||
742 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
743 | prt.Anchored = true | |
744 | prt.CFrame = cframe | |
745 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
746 | game:GetService("Debris"):AddItem(prt, 5) | |
747 | table.insert(Effects, {prt, "Cylinder", Delay, x3, y3, z3}) | |
748 | end | |
749 | ||
750 | MagicWave2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
751 | ||
752 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
753 | prt.Anchored = true | |
754 | prt.CFrame = cframe | |
755 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
756 | game:GetService("Debris"):AddItem(prt, 5) | |
757 | table.insert(Effects, {prt, "Wave", Delay, x3, y3, z3}) | |
758 | end | |
759 | ||
760 | MagicCylinder = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
761 | ||
762 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(0.2, 0.2, 0.2), material) | |
763 | prt.Anchored = true | |
764 | prt.CFrame = cframe | |
765 | local msh = mesh("SpecialMesh", prt, "Head", "", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
766 | game:GetService("Debris"):AddItem(prt, 5) | |
767 | Effects[#Effects + 1] = {prt, "Cylinder", Delay, x3, y3, z3} | |
768 | end | |
769 | ||
770 | MagicCylinder2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
771 | ||
772 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(0.2, 0.2, 0.2), material) | |
773 | prt.Anchored = true | |
774 | prt.CFrame = cframe | |
775 | local msh = mesh("CylinderMesh", prt, "", "", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
776 | game:GetService("Debris"):AddItem(prt, 5) | |
777 | Effects[#Effects + 1] = {prt, "Cylinder", Delay, x3, y3, z3} | |
778 | end | |
779 | ||
780 | MagicBlood = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
781 | ||
782 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
783 | prt.Anchored = true | |
784 | prt.CFrame = cframe | |
785 | local msh = mesh("SpecialMesh", prt, "Sphere", "", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
786 | game:GetService("Debris"):AddItem(prt, 5) | |
787 | table.insert(Effects, {prt, "Blood", Delay, x3, y3, z3}) | |
788 | end | |
789 | ||
790 | MagicRing = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
791 | ||
792 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
793 | prt.Anchored = true | |
794 | prt.CFrame = cframe | |
795 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
796 | game:GetService("Debris"):AddItem(prt, 5) | |
797 | table.insert(Effects, {prt, "Cylinder", Delay, x3, y3, z3}) | |
798 | end | |
799 | ||
800 | MagicRing2 = function(brickcolor, material, cframe, x1, y1, z1, x3, y3, z3, Delay) | |
801 | ||
802 | local prt = pert(F2, 0, 0, brickcolor, "Effect", Vec(), material) | |
803 | prt.Anchored = true | |
804 | prt.CFrame = cframe | |
805 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=3270017", Vec(0, 0, 0), Vec(x1, y1, z1)) | |
806 | game:GetService("Debris"):AddItem(prt, 5) | |
807 | table.insert(Effects, {prt, "Blood", Delay, x3, y3, z3}) | |
808 | end | |
809 | ||
810 | ElecEffect = function(brickCol, Mat, cff, x, y, z) | |
811 | ||
812 | local prt = pert(F2, 0, 0, brickCol, "Part", Vec(1, 1, 1), Mat) | |
813 | prt.Anchored = true | |
814 | prt.CFrame = cff * Cf(rand(-x, x), rand(-y, y), rand(-z, z)) | |
815 | prt.CFrame = Cf(prt.Position) | |
816 | debServ:AddItem(prt, 2) | |
817 | local xval = math.random() / 2 | |
818 | local yval = math.random() / 2 | |
819 | local zval = math.random() / 2 | |
820 | local msh = mesh("BlockMesh", prt, "", "", Vec(0, 0, 0), Vec(xval, yval, zval)) | |
821 | Effects[#Effects + 1] = {prt, "Elec", 0.1, x, y, z, xval, yval, zval} | |
822 | end | |
823 | ||
824 | Lightning = function(p0, p1, tym, ofs, col, mat, th, tra, last) | |
825 | ||
826 | local magz = (p0 - p1).magnitude | |
827 | local curpos = p0 | |
828 | local trz = {-ofs, ofs} | |
829 | for i = 1, tym do | |
830 | local li = Instance.new("Part", F2) | |
831 | li.TopSurface = 0 | |
832 | li.BottomSurface = 0 | |
833 | li.Anchored = true | |
834 | li.Transparency = tra or 0.4 | |
835 | li.BrickColor = BrickColor.new(col) | |
836 | li.Material = mat | |
837 | li.Material = "Neon" | |
838 | li.formFactor = "Custom" | |
839 | li.CanCollide = false | |
840 | li.Size = Vector3.new(th, th, magz / tym) | |
841 | local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)]) | |
842 | local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz | |
843 | if tym == i then | |
844 | local magz2 = (curpos - p1).magnitude | |
845 | li.Size = Vector3.new(th, th, magz2) | |
846 | li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2) | |
847 | game:GetService("Debris"):AddItem(li, last) | |
848 | else | |
849 | li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2) | |
850 | curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p | |
851 | game:GetService("Debris"):AddItem(li, last) | |
852 | end | |
853 | end | |
854 | end | |
855 | ||
856 | Triangle = function(a, b, c, tcol, tmat) | |
857 | ||
858 | local edg1 = (c-a):Dot((b-a).unit) | |
859 | local edg2 = (a-b):Dot((c-b).unit) | |
860 | local edg3 = (b-c):Dot((a-c).unit) | |
861 | if edg1 <= (b - a).magnitude and edg1 >= 0 then | |
862 | a = a | |
863 | elseif edg2 <= (c - b).magnitude and edg2 >= 0 then | |
864 | a = b | |
865 | elseif edg3 <= (a - c).magnitude and edg3 >= 0 then | |
866 | a = c | |
867 | else | |
868 | return | |
869 | end | |
870 | local len1 = (c-a):Dot((b-a).unit) | |
871 | local len2 = (b-a).magnitude - len1 | |
872 | local width = (a + (b-a).unit*len1 - c).magnitude | |
873 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
874 | local list = {} | |
875 | if len1 > 0.01 then | |
876 | local w1 = Inst("WedgePart", F2) | |
877 | w1.Material = tmat | |
878 | w1.BrickColor = BC(tcol) | |
879 | w1.Transparency = 0 | |
880 | w1.Reflectance = 0 | |
881 | w1.CanCollide = false | |
882 | NoOutline(w1) | |
883 | local sz = Vec(0.2, width, len1) | |
884 | w1.Size = sz | |
885 | local sp = Inst("SpecialMesh", w1) | |
886 | sp.MeshType = "Wedge" | |
887 | sp.Scale = Vec(0, 1, 1) * sz / w1.Size | |
888 | w1:BreakJoints() | |
889 | w1.Anchored = true | |
890 | w1.Transparency = 0.7 | |
891 | debServ:AddItem(w1, 25) | |
892 | table.insert(Effects, {w1, "Disappear", 0.045}) | |
893 | w1.CFrame = maincf * CFrame.Angles(math.pi, 0, math.pi / 2) * CFrame.new(0, width / 2, len1 / 2) | |
894 | table.insert(list, w1) | |
895 | end | |
896 | if len2 > 0.01 then | |
897 | local w2 = Inst("WedgePart", F2) | |
898 | w2.Material = tmat | |
899 | w2.BrickColor = BC(tcol) | |
900 | w2.Transparency = 0 | |
901 | w2.Reflectance = 0 | |
902 | w2.CanCollide = false | |
903 | NoOutline(w2) | |
904 | local sz = Vec(0.2, width, len2) | |
905 | w2.Size = sz | |
906 | local sp = Inst("SpecialMesh", w2) | |
907 | sp.MeshType = "Wedge" | |
908 | sp.Scale = Vec(0, 1, 1) * sz / w2.Size | |
909 | w2:BreakJoints() | |
910 | w2.Anchored = true | |
911 | w2.Transparency = 0.7 | |
912 | debServ:AddItem(w2, 25) | |
913 | table.insert(Effects, {w2, "Disappear", 0.045}) | |
914 | w2.CFrame = maincf * CFrame.Angles(math.pi, math.pi, -math.pi / 2) * CFrame.new(0, width / 2, -len1 - len2 / 2) | |
915 | table.insert(list, w2) | |
916 | end | |
917 | return unpack(list) | |
918 | end | |
919 | ||
920 | ||
921 | runServ.RenderStepped:connect(function() | |
922 | if #Effects > 0 then | |
923 | for e = 1, #Effects do | |
924 | if Effects[e] ~= nil then | |
925 | local Thing = Effects[e] | |
926 | if Thing ~= nil then | |
927 | local Part = Thing[1] | |
928 | local Mode = Thing[2] | |
929 | local Delay = Thing[3] | |
930 | local IncX = Thing[4] | |
931 | local IncY = Thing[5] | |
932 | local IncZ = Thing[6] | |
933 | if Thing[1].Transparency <= 1 then | |
934 | if Thing[2] == "Block1" then | |
935 | Thing[1].CFrame = Thing[1].CFrame * Euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
936 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
937 | if not Mesh then | |
938 | Mesh = Instance.new("BlockMesh") | |
939 | end | |
940 | Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6]) | |
941 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
942 | elseif Thing[2] == "Wave" then | |
943 | Thing[1].CFrame = Thing[1].CFrame * CFrame.Angles(0, rad(10), 0) | |
944 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
945 | if not Mesh then | |
946 | Mesh = Instance.new("BlockMesh") | |
947 | end | |
948 | Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6]) | |
949 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
950 | elseif Thing[2] == "Cylinder" then | |
951 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
952 | if not Mesh then | |
953 | Mesh = Instance.new("BlockMesh") | |
954 | end | |
955 | Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6]) | |
956 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
957 | elseif Thing[2] == "Blood" then | |
958 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
959 | if not Mesh then | |
960 | Mesh = Instance.new("BlockMesh") | |
961 | end | |
962 | Thing[1].CFrame = Thing[1].CFrame * Cf(0, 0.5, 0) | |
963 | Mesh.Scale = Mesh.Scale + Vec(Thing[4], Thing[5], Thing[6]) | |
964 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
965 | elseif Thing[2] == "Elec" then | |
966 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
967 | if not Mesh then | |
968 | Mesh = Instance.new("BlockMesh") | |
969 | end | |
970 | Mesh.Scale = Mesh.Scale + Vec(Thing[7], Thing[8], Thing[9]) | |
971 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
972 | elseif Thing[2] == "Disappear" then | |
973 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
974 | end | |
975 | else | |
976 | Part.Parent = nil | |
977 | debServ:AddItem(Part, 0) | |
978 | table.remove(Effects, e) | |
979 | end | |
980 | end | |
981 | end | |
982 | end | |
983 | end | |
984 | end) | |
985 | ||
986 | ||
987 | ||
988 | ||
989 | ||
990 | ||
991 | maus.KeyDown:connect(function(kei) | |
992 | if string.byte(kei)==48 and not otheranims then | |
993 | runnin=true | |
994 | end | |
995 | if kei=='w' then fldb.w=true end | |
996 | if kei=='a' then fldb.a=true end | |
997 | if kei=='s' then fldb.s=true end | |
998 | if kei=='d' then fldb.d=true end | |
999 | end) | |
1000 | maus.KeyUp:connect(function(kei) | |
1001 | if string.byte(kei)==48 and not otheranims then | |
1002 | runnin=false | |
1003 | end | |
1004 | if kei=='w' then fldb.w=false end | |
1005 | if kei=='a' then fldb.a=false end | |
1006 | if kei=='s' then fldb.s=false end | |
1007 | if kei=='d' then fldb.d=false end | |
1008 | end) | |
1009 | ||
1010 | ||
1011 | ||
1012 | maus.KeyDown:connect(function(kei) | |
1013 | if kei=='z' and attack ~= "false" then | |
1014 | ||
1015 | attackone() | |
1016 | ||
1017 | elseif kei=='x' and attack ~= "false" then | |
1018 | ||
1019 | attacktwo() | |
1020 | ||
1021 | elseif kei=='c' and attack ~= "false" then | |
1022 | ||
1023 | attackthree() | |
1024 | ||
1025 | elseif kei=='v' and attack ~= "false" then | |
1026 | ||
1027 | Untimatum() | |
1028 | ||
1029 | end | |
1030 | end) | |
1031 | ||
1032 | ||
1033 | ||
1034 | ||
1035 | ||
1036 | coroutine.wrap(function() | |
1037 | for i,x in pairs(hed:GetChildren()) do if x:IsA('Sound') then x:Destroy() end end end)() | |
1038 | function Lerp(a, b, i) | |
1039 | local com1 = {a.X, a.Y, a.Z, a:toEulerAnglesXYZ()} | |
1040 | local com2 = {b.X, b.Y, b.Z, b:toEulerAnglesXYZ()} | |
1041 | local calx = com1[1] + (com2[1] - com1[1]) * i | |
1042 | local caly = com1[2] + (com2[2] - com1[2]) * i | |
1043 | local calz = com1[3] + (com2[3] - com1[3]) * i | |
1044 | local cala = com1[4] + (com2[4] - com1[4]) * i | |
1045 | local calb = com1[5] + (com2[5] - com1[5]) * i | |
1046 | local calc = com1[6] + (com2[6] - com1[6]) * i | |
1047 | return CFrame.new(calx, caly, calz) * CFrame.Angles(cala, calb, calc) | |
1048 | end | |
1049 | function TwnSingleNumber(s,f,m) | |
1050 | local wot=s+(f-s)*m | |
1051 | return wot | |
1052 | end | |
1053 | function TwnVector3(q,w,e) | |
1054 | local begin={q.x,q.y,q.z} | |
1055 | local ending={w.x,w.y,w.z} | |
1056 | local bgx=begin[1]+(ending[1]-begin[1])*e | |
1057 | local bgy=begin[2]+(ending[2]-begin[2])*e | |
1058 | local bgz=begin[3]+(ending[3]-begin[3])*e | |
1059 | return Vector3.new(bgx,bgy,bgz) | |
1060 | end | |
1061 | newWeld = function(wld, wp0, wp1, wc0x, wc0y, wc0z) | |
1062 | wld = Instance.new("Weld", wp1) | |
1063 | wld.Part0 = wp0 | |
1064 | wld.Part1 = wp1 | |
1065 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
1066 | end | |
1067 | newWeld(law, torso, larm, -1.5, 0.5, 0) | |
1068 | newWeld(raw, torso, rarm, 1.5, 0.5, 0) | |
1069 | newWeld(llw, torso, lleg, -.5, -2, 0) | |
1070 | newWeld(rlw, torso, rleg, .5, -2, 0) | |
1071 | newWeld(hw, torso, hed, 0, 1.5, 0) | |
1072 | local rutwald=Instance.new('Weld',rutprt) | |
1073 | rutwald.Part0=rutprt | |
1074 | rutwald.Part1=torso | |
1075 | rutprt.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),math.rad(0),0) | |
1076 | larm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0) | |
1077 | rarm.Weld.C1 = CFrame.new(0, 0.5, 0)*CFrame.Angles(math.rad(0),0,0) | |
1078 | rleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0) | |
1079 | lleg.Weld.C1=CFrame.new(0,0,0)*CFrame.Angles(math.rad(0),0,0) | |
1080 | ||
1081 | local function setupPart(part) | |
1082 | part.Anchored = true | |
1083 | part.FormFactor = 'Custom' | |
1084 | part.CanCollide = false | |
1085 | part.BrickColor = BrickColor.new("Dark indigo") | |
1086 | part.Material = "Neon" | |
1087 | part.TopSurface = 'SmoothNoOutlines' | |
1088 | part.BottomSurface = 'SmoothNoOutlines' | |
1089 | part.FrontSurface = 'SmoothNoOutlines' | |
1090 | part.BackSurface = 'SmoothNoOutlines' | |
1091 | part.LeftSurface = 'SmoothNoOutlines' | |
1092 | part.RightSurface = 'SmoothNoOutlines' | |
1093 | end | |
1094 | ||
1095 | function CFrameFromTopBack(at, top, back) | |
1096 | local right = top:Cross(back) | |
1097 | return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
1098 | end | |
1099 | ||
1100 | function CreateTriangle(parent, a, b, c) | |
1101 | local this = {} | |
1102 | local mPart1 = Instance.new('WedgePart') | |
1103 | setupPart(mPart1) | |
1104 | local mPart2 = Instance.new('WedgePart') | |
1105 | setupPart(mPart2) | |
1106 | function this:Set(a, b, c) --[[ edg1 A ------|------>B --. '\ | / \ \part1|part2/ | \ cut / / Direction edges point in: edg3 \ / edg2 / (clockwise) \ / |/ \<- / ` \ / C --]] | |
1107 | local ab, bc, ca = b-a, c-b, a-c local abm, bcm, cam = ab.magnitude, bc.magnitude, ca.magnitude | |
1108 | local edg1 = math.abs(0.5 + ca:Dot(ab)/(abm*abm)) | |
1109 | local edg2 = math.abs(0.5 + ab:Dot(bc)/(bcm*bcm)) | |
1110 | local edg3 = math.abs(0.5 + bc:Dot(ca)/(cam*cam)) | |
1111 | if edg1 < edg2 then | |
1112 | if edg1 < edg3 then | |
1113 | -- nothing to change | |
1114 | else | |
1115 | a, b, c = c, a, b | |
1116 | ab, bc, ca = ca, ab, bc | |
1117 | abm = cam | |
1118 | end | |
1119 | else | |
1120 | if edg2 < edg3 then | |
1121 | a, b, c = b, c, a | |
1122 | ab, bc, ca = bc, ca, ab | |
1123 | abm = bcm | |
1124 | else | |
1125 | a, b, c = c, a, b | |
1126 | ab, bc, ca = ca, ab, bc | |
1127 | abm = cam | |
1128 | end | |
1129 | end | |
1130 | ||
1131 | local len1 = -ca:Dot(ab)/abm local len2 = abm - len1 local width = (ca + ab.unit*len1).magnitude | |
1132 | local maincf = CFrameFromTopBack(a, ab:Cross(bc).unit, -ab.unit) | |
1133 | ||
1134 | mPart1.Parent = parent | |
1135 | mPart1.Size = Vector3.new(1,1,1) | |
1136 | mPart1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
1137 | local Mesh = Instance.new("SpecialMesh",mPart1) | |
1138 | Mesh.MeshType = "Wedge" | |
1139 | Mesh.Scale = Vector3.new(0.005, width, len1) | |
1140 | ||
1141 | mPart2.Parent = parent | |
1142 | mPart2.Size = Vector3.new(1,1,1) | |
1143 | mPart2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
1144 | local Mesh = Instance.new("SpecialMesh",mPart2) | |
1145 | Mesh.MeshType = "Wedge" | |
1146 | Mesh.Scale = Vector3.new(0.005, width, len2) | |
1147 | end | |
1148 | ||
1149 | function this:SetProperty(prop, value) | |
1150 | mPart1[prop] = value | |
1151 | mPart2[prop] = value | |
1152 | end | |
1153 | ||
1154 | function this:GetProperty(prop) | |
1155 | return mPart1[prop] | |
1156 | end | |
1157 | ||
1158 | this:Set(a, b, c) | |
1159 | function this:Destroy() | |
1160 | mPart1:Destroy() | |
1161 | mPart2:Destroy() | |
1162 | end | |
1163 | return this | |
1164 | end | |
1165 | function CreateTrail(Adornee, Axis) | |
1166 | local Axis = Axis or "X" | |
1167 | ||
1168 | local trail = {} | |
1169 | trail.Triangles = {} | |
1170 | trail.Adornee = Adornee | |
1171 | trail.Axis = Axis | |
1172 | ||
1173 | local L1, L2 | |
1174 | ||
1175 | function trail:Fade(speed) | |
1176 | local speed = speed or 0.01 | |
1177 | ||
1178 | for n, v in pairs(trail.Triangles) do | |
1179 | v:SetProperty("Transparency", v:GetProperty("Transparency") + speed) | |
1180 | if v:GetProperty("Transparency") >= 1 then | |
1181 | v:Destroy() | |
1182 | ||
1183 | table.remove(trail.Triangles, n) | |
1184 | end | |
1185 | end | |
1186 | end | |
1187 | ||
1188 | function trail:Update() | |
1189 | local adornee = trail.Adornee | |
1190 | ||
1191 | local axis = trail.Axis | |
1192 | local Size = Vector3.new((axis == "X" and adornee.Size.X or 0), (axis == "Y" and adornee.Size.Y or 0), (axis == "Z" and adornee.Size.Z or 0)) | |
1193 | local P1 = adornee.CFrame * CFrame.new(Size / 2) | |
1194 | local P2 = adornee.CFrame * CFrame.new(Size / -2) | |
1195 | ||
1196 | if L1 and L2 then | |
1197 | table.insert(trail.Triangles, CreateTriangle(adornee, L1.p, L2.p, P1.p)) | |
1198 | table.insert(trail.Triangles, CreateTriangle(adornee, P1.p, P2.p, L2.p)) | |
1199 | end | |
1200 | ||
1201 | L1, L2 = P1, P2 | |
1202 | end | |
1203 | ||
1204 | return trail | |
1205 | end | |
1206 | ||
1207 | ||
1208 | ||
1209 | ||
1210 | ||
1211 | ||
1212 | Player=game:GetService('Players').LocalPlayer | |
1213 | Character=Player.Character | |
1214 | Mouse=Player:GetMouse() | |
1215 | m=Instance.new('Model',Character) | |
1216 | ||
1217 | ||
1218 | local function weldBetween(a, b) | |
1219 | local weldd = Instance.new("ManualWeld") | |
1220 | weldd.Part0 = a | |
1221 | weldd.Part1 = b | |
1222 | weldd.C0 = CFrame.new() | |
1223 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
1224 | weldd.Parent = a | |
1225 | return weldd | |
1226 | end | |
1227 | ||
1228 | it=Instance.new | |
1229 | ||
1230 | function nooutline(part) | |
1231 | part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10 | |
1232 | end | |
1233 | ||
1234 | function part(formfactor,parent,material,reflectance,transparency,brickcolor,name,size) | |
1235 | local fp=it("Part") | |
1236 | fp.Shape=formfactor | |
1237 | fp.Parent=parent | |
1238 | fp.Reflectance=reflectance | |
1239 | fp.Transparency=transparency | |
1240 | fp.CanCollide=false | |
1241 | fp.Locked=true | |
1242 | fp.BrickColor=BrickColor.new(tostring(brickcolor)) | |
1243 | fp.Name=name | |
1244 | fp.Size=size | |
1245 | fp.Position=torso.Position | |
1246 | nooutline(fp) | |
1247 | fp.Material=material | |
1248 | fp:BreakJoints() | |
1249 | return fp | |
1250 | end | |
1251 | ||
1252 | ||
1253 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
1254 | local mesh=it(Mesh) | |
1255 | mesh.Parent=part | |
1256 | if Mesh=="SpecialMesh" then | |
1257 | mesh.MeshType=meshtype | |
1258 | mesh.MeshId=meshid | |
1259 | end | |
1260 | mesh.Offset=offset | |
1261 | mesh.Scale=scale | |
1262 | return mesh | |
1263 | end | |
1264 | ||
1265 | function weld(parent,part0,part1,c0,c1) | |
1266 | local weld=it("Weld") | |
1267 | weld.Parent=parent | |
1268 | weld.Part0=part0 | |
1269 | weld.Part1=part1 | |
1270 | weld.C0=c0 | |
1271 | weld.C1=c1 | |
1272 | return weld | |
1273 | end | |
1274 | ||
1275 | local Spheres = it("Model") | |
1276 | Spheres.Parent=Character | |
1277 | ||
1278 | ||
1279 | Main_Head=part(Enum.PartType.Ball,m,Enum.Material.Neon,0,0.4099999666214,"Mulberry","Handle",Vector3.new(2.96000004, 2.96000004, 2.96000004)) | |
1280 | Main_Headweld=weld(m,Character["Torso"],Main_Head,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.00997161865, 0.0349311829, -4.91999435, 1, 0, 0, 0, 0, -1, 0, 1, 0)) | |
1281 | MainH_Part=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","MainH_Part",Vector3.new(1.7518369, 1.7518369, 1.7518369)) | |
1282 | MainH_Partweld=weld(m,Main_Head,MainH_Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -0.0603561401, 1.62124634e-005, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
1283 | ||
1284 | ||
1285 | Main_RH=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948)) | |
1286 | Main_RHweld=weld(m,Character["Right Leg"],Main_RH,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.959936023, 0.0700092316, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1)) | |
1287 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
1288 | Partweld=weld(m,Main_RH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950025678, -0.479959488, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
1289 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
1290 | Partweld=weld(m,Main_RH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950011849, 0.410047531, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
1291 | Sphere_RH1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Institutional white","Sphere_RH1",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
1292 | Sphere_RH1weld=weld(m,Main_RH,Sphere_RH1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.190037251, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
1293 | ||
1294 | ||
1295 | TrailThingy1 = CreateTrail(Sphere_RH1,"Y") | |
1296 | ||
1297 | ||
1298 | ||
1299 | Main_LH=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948)) | |
1300 | Main_LHweld=weld(m,Character["Left Leg"],Main_LH,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.954887033, -7.62939453e-006, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1)) | |
1301 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
1302 | Partweld=weld(m,Main_LH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.95002377, -0.479957581, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
1303 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
1304 | Partweld=weld(m,Main_LH,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950009704, 0.410041809, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
1305 | Sphere_LH1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Institutional white","Sphere_LH1",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
1306 | Sphere_LH1weld=weld(m,Main_LH,Sphere_LH1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.190037251, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
1307 | ||
1308 | TrailThingy2 = CreateTrail(Sphere_LH1,"Y") | |
1309 | ||
1310 | ||
1311 | Main_RW=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948)) | |
1312 | Main_RWweld=weld(m,Character["Right Arm"],Main_RW,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.964890003, -0.0200252533, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1)) | |
1313 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
1314 | Partweld=weld(m,Main_RW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950019598, -0.479948044, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
1315 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
1316 | Partweld=weld(m,Main_RW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950009584, 0.460039902, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
1317 | Sphere_RW2=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW2",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
1318 | Sphere_RW2weld=weld(m,Main_RW,Sphere_RW2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, -1.94488883, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
1319 | Sphere_RW1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW1",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
1320 | Sphere_RW1weld=weld(m,Main_RW,Sphere_RW1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0, 0.190035343, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
1321 | ||
1322 | ||
1323 | TrailThingy3 = CreateTrail(Sphere_RW1,"Y") | |
1324 | ||
1325 | ||
1326 | Main_LW=part(Enum.PartType.Cylinder,m,Enum.Material.Marble,0,0,"Eggplant","Handle",Vector3.new(0.200000003, 0.929999948, 0.929999948)) | |
1327 | Main_LWweld=weld(m,Character["Left Arm"],Main_LW,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.974956036, 0.0399856567, -0.0149731636, 0, 0.999999881, 0, -1, 0, 0, 0, 0, 1)) | |
1328 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
1329 | Partweld=weld(m,Main_LW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950020552, -0.479957581, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
1330 | Sphere_LW1=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW1",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
1331 | Sphere_LW1weld=weld(m,Main_LW,Sphere_LW1,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.52587891e-005, 0.190036297, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
1332 | Sphere_LW2=part(Enum.PartType.Ball,Spheres,Enum.Material.Neon,0,0,"Really black","Sphere_LW2",Vector3.new(0.559999943, 0.559999943, 0.559999943)) | |
1333 | Sphere_LW2weld=weld(m,Main_LW,Sphere_LW2,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-1.52587891e-005, -1.98496461, 0, 0, -1, 0, 0.999999762, 0, 0, 0, 0, 1)) | |
1334 | Part=part(Enum.PartType.Block,m,Enum.Material.Marble,0,0,"Eggplant","Part",Vector3.new(2.08000016, 0.200000003, 0.200000003)) | |
1335 | Partweld=weld(m,Main_LW,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.950009584, 0.410041809, 0, 0.999999762, 0, 0, 0, 1, 0, 0, 0, 1)) | |
1336 | ||
1337 | TrailThingy5 = CreateTrail(Sphere_LW1,"Y") | |
1338 | ||
1339 | ||
1340 | local particleemitter = Instance.new("ParticleEmitter", MainH_Part) | |
1341 | PARSI = .5 | |
1342 | particleemitter.Lifetime = NumberRange.new(0.2) | |
1343 | particleemitter.Speed = NumberRange.new(0) | |
1344 | ||
1345 | game:service'RunService'.RenderStepped:connect(function() | |
1346 | particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, PARSI), NumberSequenceKeypoint.new(1, PARSI)}) | |
1347 | end) | |
1348 | ||
1349 | particleemitter.Rate = 1000 | |
1350 | particleemitter.Rotation = NumberRange.new(0, 360) | |
1351 | particleemitter.LightEmission = 1 | |
1352 | particleemitter.Color = ColorSequence.new(Color3.new(0.639216, 0.227451, 1), Color3.new(0.639216, 0.227451, 1)) | |
1353 | particleemitter.Texture = "http://www.roblox.com/asset/?id=243098098" | |
1354 | particleemitter.LockedToPart = true | |
1355 | ||
1356 | local particleemitter = Instance.new("ParticleEmitter", MainH_Part) | |
1357 | ||
1358 | particleemitter.Lifetime = NumberRange.new(0.2) | |
1359 | particleemitter.Speed = NumberRange.new(0) | |
1360 | ||
1361 | game:service'RunService'.RenderStepped:connect(function() | |
1362 | particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, PARSI), NumberSequenceKeypoint.new(1, PARSI)}) | |
1363 | end) | |
1364 | ||
1365 | particleemitter.Rate = 1000 | |
1366 | particleemitter.Rotation = NumberRange.new(0, 360) | |
1367 | particleemitter.LightEmission = 1 | |
1368 | particleemitter.Color = ColorSequence.new(Color3.new(0.639216, 0.227451, 1), Color3.new(0.639216, 0.227451, 1)) | |
1369 | particleemitter.Texture = "http://www.roblox.com/asset/?id=243098098" | |
1370 | particleemitter.LockedToPart = true | |
1371 | ||
1372 | ||
1373 | local particleemitter = Instance.new("ParticleEmitter", MainH_Part) | |
1374 | ||
1375 | particleemitter.Lifetime = NumberRange.new(0.2) | |
1376 | particleemitter.Speed = NumberRange.new(0) | |
1377 | ||
1378 | game:service'RunService'.RenderStepped:connect(function() | |
1379 | particleemitter.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, PARSI), NumberSequenceKeypoint.new(1, PARSI)}) | |
1380 | end) | |
1381 | ||
1382 | particleemitter.Rate = 1000 | |
1383 | particleemitter.Rotation = NumberRange.new(0, 360) | |
1384 | particleemitter.LightEmission = 1 | |
1385 | particleemitter.Color = ColorSequence.new(Color3.new(0.639216, 0.227451, 1), Color3.new(0.639216, 0.227451, 1)) | |
1386 | particleemitter.Texture = "http://www.roblox.com/asset/?id=243098098" | |
1387 | particleemitter.LockedToPart = true | |
1388 | ||
1389 | ||
1390 | local particleemitterglow = Instance.new("ParticleEmitter", MainH_Part) | |
1391 | ||
1392 | particleemitterglow.Lifetime = NumberRange.new(1) | |
1393 | particleemitterglow.Speed = NumberRange.new(0) | |
1394 | particleemitterglow.Size = NumberSequence.new({NumberSequenceKeypoint.new(0, 10), NumberSequenceKeypoint.new(0.102, 1), NumberSequenceKeypoint.new(0.353, 8.063), NumberSequenceKeypoint.new(0.56, 2.938), NumberSequenceKeypoint.new(0.703, 8.563), NumberSequenceKeypoint.new(1, 0)}) | |
1395 | particleemitterglow.Rate = 5 | |
1396 | particleemitterglow.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 1), NumberSequenceKeypoint.new(0.1, 0.5), NumberSequenceKeypoint.new(0.8, 0.5), NumberSequenceKeypoint.new(1, 1)}) | |
1397 | particleemitterglow.Name = "ParticleEmitterGlow" | |
1398 | particleemitterglow.LightEmission = 1 | |
1399 | particleemitterglow.Color = ColorSequence.new(Color3.new(0.333333, 0, 0), Color3.new(0.333333, 0, 0)) | |
1400 | particleemitterglow.Texture = "http://www.roblox.com/asset/?id=243660373" | |
1401 | particleemitterglow.LockedToPart = true | |
1402 | ||
1403 | ||
1404 | ||
1405 | ||
1406 | ||
1407 | game:service'RunService'.RenderStepped:connect(function() | |
1408 | ||
1409 | if anim == "Sprinting" then | |
1410 | TrailThingy3:Update() | |
1411 | TrailThingy3:Fade(0.2) | |
1412 | TrailThingy5:Update() | |
1413 | TrailThingy5:Fade(0.2) | |
1414 | TrailThingy1:Update() | |
1415 | TrailThingy1:Fade(0.2) | |
1416 | TrailThingy2:Update() | |
1417 | TrailThingy2:Fade(0.2) | |
1418 | end | |
1419 | ||
1420 | if anim ~= "Sprinting" then | |
1421 | TrailThingy3:Update() | |
1422 | TrailThingy3:Fade(1) | |
1423 | TrailThingy5:Update() | |
1424 | TrailThingy5:Fade(1) | |
1425 | TrailThingy1:Update() | |
1426 | TrailThingy1:Fade(1) | |
1427 | TrailThingy2:Update() | |
1428 | TrailThingy2:Fade(1) | |
1429 | end | |
1430 | ||
1431 | if anim~=lastanim then | |
1432 | runtime=0 | |
1433 | end | |
1434 | lastanim=anim | |
1435 | chr.Humanoid.CameraOffset=(rutprt.CFrame:toObjectSpace(hed.CFrame)).p+Vector3.new(0,-1.25,0) | |
1436 | syne=syne+.95 | |
1437 | if not otheranims and not swimming then | |
1438 | if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 1 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5 | |
1439 | anim="Idling" | |
1440 | elseif (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude > 1 and (rutprt.Velocity*Vector3.new(1, 0, 1)).magnitude < RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5 | |
1441 | anim="Walking" | |
1442 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > RunSpeed-10 and not chr.Humanoid.Jump then-- and torso.Velocity.y<5 and torso.Velocity.y>-5 | |
1443 | anim="Sprinting" | |
1444 | elseif torso.Velocity.y>5 and chr.Humanoid.Jump then | |
1445 | anim='Jumping' | |
1446 | elseif (torso.Velocity.y < -5) and chr.Humanoid.Jump then | |
1447 | anim='Falling' | |
1448 | end | |
1449 | end | |
1450 | ||
1451 | if otheranims then return end | |
1452 | if anim=="Idling" then | |
1453 | idlesineinc=35 | |
1454 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,3-1*math.cos(syne/10),0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
1455 | ||
1456 | if not armmovments then | |
1457 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(0,0,math.rad(3)),.1) | |
1458 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525+math.cos(syne/idlesineinc)/25,0)*CFrame.Angles(0,0,math.rad(-3)),.1) | |
1459 | end | |
1460 | ||
1461 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.55, -1.4-0.1*math.cos(syne/10), -0.55) * CFrame.Angles(math.rad(-10+1*math.cos(syne/10)), math.rad(10), math.rad(-0-2*math.cos(syne/10))), 0.4) | |
1462 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.55, -2-0.1*math.cos(syne/10), 0) * CFrame.Angles(0, math.rad(-10), math.rad(0+2*math.cos(syne/10))), 0.4) | |
1463 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/idlesineinc)/50,0)*CFrame.Angles(math.cos(syne/idlesineinc)/40,0,0),.1) | |
1464 | end | |
1465 | ||
1466 | if anim=="Walking" then | |
1467 | ||
1468 | if not armmovments then | |
1469 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0) * CFrame.Angles(math.rad(-30), math.rad(0), math.rad(-40)), 0.3) | |
1470 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)* CFrame.Angles(math.rad(-30), math.rad(0), math.rad(40)), 0.3) | |
1471 | end | |
1472 | ||
1473 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.9-math.cos(syne/6)/10,-(math.cos(syne/6)/1.125))*CFrame.Angles(math.cos(syne/6)/1.125,0,math.rad(-2.5)),.1) | |
1474 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9-math.cos(syne/6)/10,math.cos(syne/6)/1.125)*CFrame.Angles(-(math.cos(syne/6)/1.125),0,math.rad(2.5)),.1) | |
1475 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.55+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(20),0,0),.1) | |
1476 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,3+math.cos(syne/2.5)/15,math.cos(syne/2.5))*CFrame.Angles(math.cos(syne/2.5)/10+math.rad(-25),math.cos(syne/2.5)/10,math.cos(syne/4)/20+math.sin(rutprt.RotVelocity.y/2)/4),.1) | |
1477 | end | |
1478 | ||
1479 | if anim=="Sprinting" then | |
1480 | ArmsTrail = true | |
1481 | ||
1482 | if not armmovments then | |
1483 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(-55),0,math.rad(12.5)),.1) | |
1484 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(-55),0,math.rad(-12.5)),.1) | |
1485 | end | |
1486 | ||
1487 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.6-math.cos(syne/4)/4,-(math.cos(syne/4)*2)-math.rad(10))*CFrame.Angles(math.cos(syne/4)*2+math.rad(10),0,math.rad(-2.5)),.1) | |
1488 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.6-math.cos(syne/4)/4,math.cos(syne/4)*2-math.rad(10))*CFrame.Angles(-(math.cos(syne/4)*2)+math.rad(10),0,math.rad(2.5)),.1) | |
1489 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.55+math.cos(syne/20)/50,0)*CFrame.Angles(-math.cos(syne/2.5)/10+math.rad(20),0,0),.1) | |
1490 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,3+math.cos(syne/2.5)/15,math.cos(syne/2.5))*CFrame.Angles(math.cos(syne/3)/15+math.rad(-40),math.cos(syne/2.5)/10,math.cos(syne/4)/20+math.sin(rutprt.RotVelocity.y/2)/4),.1) | |
1491 | ArmsTrail = false | |
1492 | end | |
1493 | ||
1494 | if anim=="Jumping" then | |
1495 | ||
1496 | if not armmovments then | |
1497 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(50)),.1) | |
1498 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-50)),.1) | |
1499 | end | |
1500 | ||
1501 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.4,0)*CFrame.Angles(math.rad(-17.5),0,math.rad(-2.5)),.1) | |
1502 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.1,-.1)*CFrame.Angles(math.rad(-17.5),0,math.rad(2.5)),.1) | |
1503 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5+math.cos(syne/20)/50,0)*CFrame.Angles(math.cos(syne/20)/40,0,0),.1) | |
1504 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(-15),math.rad(0),math.rad(0)),.1) | |
1505 | end | |
1506 | ||
1507 | if anim=="Falling" then | |
1508 | ||
1509 | if not armmovments then | |
1510 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(70)),.035) | |
1511 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)*CFrame.Angles(math.rad(10),0,math.rad(-70)),.035) | |
1512 | end | |
1513 | ||
1514 | lleg.Weld.C0=Lerp(lleg.Weld.C0,CFrame.new(-.55,-1.2,0)*CFrame.Angles(math.rad(-14),0,math.rad(-2.5)),.035) | |
1515 | rleg.Weld.C0=Lerp(rleg.Weld.C0,CFrame.new(.55,-1.9,0)*CFrame.Angles(math.rad(0),0,math.rad(2.5)),.035) | |
1516 | hed.Weld.C0=Lerp(hed.Weld.C0,CFrame.new(0,1.5,-.3)*CFrame.Angles(math.rad(-40),0,0),.035) | |
1517 | rutprt.Weld.C0=Lerp(rutprt.Weld.C0,CFrame.new(0,-.1+math.cos(syne/20)/20,0)*CFrame.Angles(math.rad(10),math.rad(0),math.rad(0)),.035) | |
1518 | end | |
1519 | ||
1520 | ||
1521 | ||
1522 | ||
1523 | if runnin and not otheranims and not swimming then | |
1524 | chr.Humanoid.WalkSpeed=RunSpeed | |
1525 | elseif not runnin and not otheranims and not swimming then | |
1526 | chr.Humanoid.WalkSpeed=WlkSpeed | |
1527 | end | |
1528 | end) | |
1529 | ||
1530 | ||
1531 | --[[]]----[[Moves]]----[[]]-- | |
1532 | attackone = function() | |
1533 | ||
1534 | attack = true | |
1535 | armmovments=true | |
1536 | ||
1537 | for i = 0, 1, 0.13 do | |
1538 | swait() | |
1539 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0) * CFrame.Angles(math.rad(160), math.rad(0), math.rad(-40)), 0.3) | |
1540 | larm.Weld.C0=Lerp(larm.Weld.C0,CFrame.new(-1.5,.525,0)* CFrame.Angles(math.rad(160), math.rad(0), math.rad(40)), 0.3) | |
1541 | PARSI = PARSI + i/2--i + i/.5 | |
1542 | end | |
1543 | wait(1) | |
1544 | for i = 0, 1, 0.13 do | |
1545 | swait() | |
1546 | PARSI = PARSI - i/2--i + i/.5 | |
1547 | end | |
1548 | ||
1549 | attack = false | |
1550 | armmovments=false | |
1551 | end | |
1552 | ||
1553 | ||
1554 | ||
1555 | ||
1556 | attacktwo = function() | |
1557 | attack = true | |
1558 | armmovments=true | |
1559 | ||
1560 | for i = 0, 20, 0.13 do | |
1561 | swait() | |
1562 | rarm.Weld.C0=Lerp(rarm.Weld.C0,CFrame.new(1.5,.525,0) * CFrame.Angles(math.rad(180), math.rad(0), math.rad(0)), 0.3) | |
1563 | MagniDamage(RootPart, 12, true, 1, 2, true, 10, "Compensate-Knockdown", 0.01, false, 0, false, _, "", "") | |
1564 | local rnum = 20 | |
1565 | local Rand1, Rand2, Rand3, Rand4 = {rand(-rnum, rnum), rand(-rnum, rnum), rand(-rnum, rnum)}, {rand(-rnum, rnum), rand(-rnum, rnum), rand(-rnum, rnum)}, {rand(-360, 360), rand(-360, 360), rand(-360, 360)}, {rand(-rnum, rnum), rand(-rnum, rnum), rand(-rnum, rnum)} | |
1566 | MagicSpikeBall(BrickColor.new("Royal purple"), "Neon", rarm.CFrame + Vector3.new(0,15,0), 0, 0, 0, 0.3, 0.3, 0.3, 0.1) | |
1567 | MagicCircle(BrickColor.new("Really black"), "Neon", rarm.CFrame + Vector3.new(0,15,0), 0, 0, 0, 0.3, 0.3, 0.3, 0.1) | |
1568 | end | |
1569 | ||
1570 | for i = 0, 1, 0.1 do | |
1571 | swait() | |
1572 | ||
1573 | end | |
1574 | ||
1575 | attack = false | |
1576 | armmovments=false | |
1577 | end | |
1578 | ||
1579 | ||
1580 | ||
1581 | ||
1582 | ||
1583 | attackthree = function() | |
1584 | ||
1585 | attack = true | |
1586 | otheranims=true | |
1587 | ||
1588 | for i = 0, 1, 0.13 do | |
1589 | swait() | |
1590 | ||
1591 | end | |
1592 | ||
1593 | for i = 0, 1, 0.1 do | |
1594 | swait() | |
1595 | ||
1596 | end | |
1597 | otheranims=false | |
1598 | attack = false | |
1599 | ||
1600 | end | |
1601 | ||
1602 | ||
1603 | ||
1604 | ||
1605 | Untimatum = function() | |
1606 | ||
1607 | attack = true | |
1608 | otheranims=true | |
1609 | ||
1610 | ||
1611 | ||
1612 | otheranims=false | |
1613 | attack = false | |
1614 | end | |
1615 | --[[]]----[[Moves]]----[[]]-- | |
1616 | ||
1617 | ||
1618 | for i = 0, 1, 0.1 do | |
1619 | swait() | |
1620 | MagicBlock(BrickColor.new("Really black"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1621 | MagicBlock(BrickColor.new("Really black"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1622 | MagicBlock(BrickColor.new("Really black"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1623 | ||
1624 | MagicBlock(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame * Cf(0, -1.15, 0), 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1625 | MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1626 | MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1627 | MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1628 | MagicCircle(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1629 | ||
1630 | MagicBlock(BrickColor.new("Royal purple"), "SmoothPlastic", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1631 | MagicBlock(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.02) | |
1632 | ||
1633 | MagicSpikeBall(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1634 | MagicSpikeBall(BrickColor.new("Royal purple"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1635 | ||
1636 | MagicCircle(BrickColor.new("Really black"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1637 | MagicCircle(BrickColor.new("Really black"), "Neon", RootPart.CFrame, 0, 0, 0, 0.7, 0.7, 0.7, 0.2) | |
1638 | end | |
1639 | ||
1640 | function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans) | |
1641 | local magz = (Part0 - Part1).magnitude | |
1642 | local curpos = Part0 | |
1643 | local trz = {-Offset,Offset} | |
1644 | for i=1,Times do | |
1645 | local li = Instance.new("Part", torso) | |
1646 | li.Name = "Lightning" | |
1647 | li.TopSurface =0 | |
1648 | li.Material = "Neon" | |
1649 | li.BottomSurface = 0 | |
1650 | li.Anchored = true | |
1651 | li.Locked = true | |
1652 | li.Transparency = Trans or 0.4 | |
1653 | li.BrickColor = BrickColor.new(Color) | |
1654 | li.formFactor = "Custom" | |
1655 | li.CanCollide = false | |
1656 | li.Size = Vector3.new(Thickness,Thickness,magz/Times) | |
1657 | local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
1658 | local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet | |
1659 | if Times == i then | |
1660 | local magz2 = (curpos - Part1).magnitude | |
1661 | li.Size = Vector3.new(Thickness,Thickness,magz2) | |
1662 | li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2) | |
1663 | else | |
1664 | li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2) | |
1665 | end | |
1666 | curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p | |
1667 | game.Debris:AddItem(li,.1) | |
1668 | end | |
1669 | end | |
1670 | ||
1671 | BodyParts = {} -- Parts to emit lightning effects from | |
1672 | for _, v in pairs(Spheres:GetChildren()) do | |
1673 | if v:IsA("Part") then | |
1674 | table.insert(BodyParts, v) | |
1675 | end | |
1676 | end | |
1677 | ||
1678 | Bounding = {} -- Calculate the bounding boxes | |
1679 | for _, v in pairs(BodyParts) do | |
1680 | local temp = {X=nil, Y=nil, Z=nil} | |
1681 | temp.X = v.Size.X/2 * 10 | |
1682 | temp.Y = v.Size.Y/2 * 10 | |
1683 | temp.Z = v.Size.Z/2 * 10 | |
1684 | Bounding[v.Name] = temp | |
1685 | --table.insert(Bounding, v.Name, temp) | |
1686 | end | |
1687 | ||
1688 | while wait(math.random(1,10)/10) do -- Emit the Lightning effects randomly | |
1689 | local Body1 = BodyParts[math.random(#BodyParts)] | |
1690 | local Body2 = BodyParts[math.random(#BodyParts)] | |
1691 | local Pos1 = Vector3.new( | |
1692 | math.random(-Bounding[Body1.Name].X, Bounding[Body1.Name].X)/10, | |
1693 | math.random(-Bounding[Body1.Name].Y, Bounding[Body1.Name].Y)/10, | |
1694 | math.random(-Bounding[Body1.Name].Z, Bounding[Body1.Name].Z)/10 | |
1695 | ) | |
1696 | local Pos2 = Vector3.new( | |
1697 | math.random(-Bounding[Body2.Name].X, Bounding[Body2.Name].X)/10, | |
1698 | math.random(-Bounding[Body2.Name].Y, Bounding[Body2.Name].Y)/10, | |
1699 | math.random(-Bounding[Body2.Name].Z, Bounding[Body2.Name].Z)/10 | |
1700 | ) | |
1701 | local SPos1 = Body1.Position + Pos1 | |
1702 | local SPos2 = Body2.Position + Pos2 | |
1703 | Lightning(SPos1, SPos2, 6, 5, "Dark indigo", .03, .56) | |
1704 | end | |
1705 | ||
1706 | ||
1707 | if #Effects > 0 then | |
1708 | for e = 1, #Effects do | |
1709 | if Effects[e] ~= nil then | |
1710 | local Thing = Effects[e] | |
1711 | if Thing ~= nil then | |
1712 | local Part = Thing[1] | |
1713 | local Mode = Thing[2] | |
1714 | local Delay = Thing[3] | |
1715 | local IncX = Thing[4] | |
1716 | local IncY = Thing[5] | |
1717 | local IncZ = Thing[6] | |
1718 | if Thing[1].Transparency <= 1 then | |
1719 | if Thing[2] == "Block1" then | |
1720 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1721 | Mesh = Thing[1].Mesh | |
1722 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1723 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1724 | elseif Thing[2] == "Block2" then | |
1725 | Thing[1].CFrame = Thing[1].CFrame | |
1726 | Mesh = Thing[7] | |
1727 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1728 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1729 | elseif Thing[2] == "Cylinder" then | |
1730 | Mesh = Thing[1].Mesh | |
1731 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1732 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1733 | elseif Thing[2] == "Blood" then | |
1734 | Mesh = Thing[7] | |
1735 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0) | |
1736 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1737 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1738 | elseif Thing[2] == "Elec" then | |
1739 | Mesh = Thing[1].Mesh | |
1740 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
1741 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1742 | elseif Thing[2] == "Disappear" then | |
1743 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1744 | elseif Thing[2] == "Shatter" then | |
1745 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1746 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
1747 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
1748 | Thing[6] = Thing[6] + Thing[5] | |
1749 | end | |
1750 | else | |
1751 | Part.Parent = nil | |
1752 | table.remove(Effects, e) | |
1753 | end | |
1754 | end | |
1755 | end | |
1756 | end | |
1757 | end |