SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end | |
2 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
3 | local RealPlayer = Player | |
4 | 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()}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;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 t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)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 self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({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")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end | |
5 | ||
6 | ||
7 | ||
8 | wait(0.2) | |
9 | ||
10 | ||
11 | ||
12 | Player = game:GetService("Players").LocalPlayer | |
13 | PlayerGui = Player.PlayerGui | |
14 | Cam = workspace.CurrentCamera | |
15 | Backpack = Player.Backpack | |
16 | Character = Player.Character | |
17 | Humanoid = Character.Humanoid | |
18 | Mouse = Player:GetMouse() | |
19 | RootPart = Character["HumanoidRootPart"] | |
20 | Torso = Character["Torso"] | |
21 | Head = Character["Head"] | |
22 | RightArm = Character["Right Arm"] | |
23 | LeftArm = Character["Left Arm"] | |
24 | RightLeg = Character["Right Leg"] | |
25 | LeftLeg = Character["Left Leg"] | |
26 | RootJoint = RootPart["RootJoint"] | |
27 | Neck = Torso["Neck"] | |
28 | RightShoulder = Torso["Right Shoulder"] | |
29 | LeftShoulder = Torso["Left Shoulder"] | |
30 | RightHip = Torso["Right Hip"] | |
31 | LeftHip = Torso["Left Hip"] | |
32 | local sick = Instance.new("Sound",Character) | |
33 | - | sick.SoundId = "rbxassetid://1110421128" |
33 | + | sick.SoundId = "rbxassetid://781170560" |
34 | sick.Looped = true | |
35 | sick.Pitch = 1 | |
36 | - | sick.Volume = 3 |
36 | + | sick.Volume = 10 |
37 | sick:Play() | |
38 | local target = nil | |
39 | ||
40 | IT = Instance.new | |
41 | CF = CFrame.new | |
42 | VT = Vector3.new | |
43 | RAD = math.rad | |
44 | C3 = Color3.new | |
45 | UD2 = UDim2.new | |
46 | BRICKC = BrickColor.new | |
47 | ANGLES = CFrame.Angles | |
48 | EULER = CFrame.fromEulerAnglesXYZ | |
49 | COS = math.cos | |
50 | ACOS = math.acos | |
51 | SIN = math.sin | |
52 | ASIN = math.asin | |
53 | ABS = math.abs | |
54 | MRANDOM = math.random | |
55 | FLOOR = math.floor | |
56 | ||
57 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
58 | local NEWMESH = IT(MESH) | |
59 | if MESH == "SpecialMesh" then | |
60 | NEWMESH.MeshType = MESHTYPE | |
61 | if MESHID ~= "nil" and MESHID ~= "" then | |
62 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
63 | end | |
64 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
65 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
66 | end | |
67 | end | |
68 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
69 | NEWMESH.Scale = SCALE | |
70 | NEWMESH.Parent = PARENT | |
71 | return NEWMESH | |
72 | end | |
73 | ||
74 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE) | |
75 | local NEWPART = IT("Part") | |
76 | NEWPART.formFactor = FORMFACTOR | |
77 | NEWPART.Reflectance = REFLECTANCE | |
78 | NEWPART.Transparency = TRANSPARENCY | |
79 | NEWPART.CanCollide = false | |
80 | NEWPART.Locked = true | |
81 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
82 | NEWPART.Name = NAME | |
83 | NEWPART.Size = SIZE | |
84 | NEWPART.Position = Torso.Position | |
85 | NEWPART.Material = MATERIAL | |
86 | NEWPART:BreakJoints() | |
87 | NEWPART.Parent = PARENT | |
88 | return NEWPART | |
89 | end | |
90 | ||
91 | ||
92 | --//=================================\\ | |
93 | --|| CUSTOMIZATION | |
94 | --\\=================================// | |
95 | ||
96 | Class_Name = "Template" | |
97 | Weapon_Name = "Add-ons" | |
98 | ||
99 | Custom_Colors = { | |
100 | Custom_Color_1 = BRICKC("Institutional white"); --1st color for the weapon. | |
101 | Custom_Color_2 = BRICKC("Institutional white"); --2nd color for the weapon. | |
102 | ||
103 | Custom_Color_3 = BRICKC("Institutional white"); --Color for the abilities. | |
104 | Custom_Color_4 = BRICKC("Institutional white"); --Color for the secondary bar. | |
105 | Custom_Color_5 = BRICKC("Institutional white"); --Color for the mana bar. | |
106 | Custom_Color_6 = BRICKC("Institutional white"); --Color for the health bar. | |
107 | Custom_Color_7 = BRICKC("Institutional white"); --Color for the stun bar. | |
108 | ||
109 | Custom_Color_8 = BRICKC("Institutional white"); --Background for the mana bar. | |
110 | Custom_Color_9 = BRICKC("Institutional white"); --Background for the secondary mana bar. | |
111 | Custom_Color_10 = BRICKC("Institutional white"); --Background for the stun bar. | |
112 | Custom_Color_11 = BRICKC("Institutional white"); --Background for the health bar. | |
113 | Custom_Color_12 = BRICKC("Institutional white"); --Background for the abilities. | |
114 | } | |
115 | ||
116 | ||
117 | Player_Size = 1 --Size of the player. | |
118 | Animation_Speed = 1 | |
119 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
120 | ||
121 | local Speed = 75 | |
122 | local Effects2 = {} | |
123 | ||
124 | --//=================================\\ | |
125 | --|| END OF CUSTOMIZATION | |
126 | --\\=================================// | |
127 | ||
128 | local function weldBetween(a, b) | |
129 | local weldd = Instance.new("ManualWeld") | |
130 | weldd.Part0 = a | |
131 | weldd.Part1 = b | |
132 | weldd.C0 = CFrame.new() | |
133 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
134 | weldd.Parent = a | |
135 | return weldd | |
136 | end | |
137 | ||
138 | function createaccessory(attachmentpart,mesh,texture,scale,offset,color) | |
139 | local acs = Instance.new("Part") | |
140 | acs.CanCollide = false | |
141 | acs.Anchored = false | |
142 | acs.Size = Vector3.new(0,0,0) | |
143 | acs.CFrame = attachmentpart.CFrame | |
144 | acs.Parent = Character | |
145 | acs.BrickColor = color | |
146 | local meshs = Instance.new("SpecialMesh") | |
147 | meshs.MeshId = mesh | |
148 | meshs.TextureId = texture | |
149 | meshs.Parent = acs | |
150 | meshs.Scale = scale | |
151 | meshs.Offset = offset | |
152 | weldBetween(attachmentpart,acs) | |
153 | end | |
154 | ||
155 | function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE) | |
156 | if TYPE == "Gem" then | |
157 | local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0)) | |
158 | acs.Anchored = false | |
159 | acs.CanCollide = false | |
160 | acs.CFrame = PART.CFrame | |
161 | local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET) | |
162 | weldBetween(PART,acs) | |
163 | elseif TYPE == "Skull" then | |
164 | local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0)) | |
165 | acs.Anchored = false | |
166 | acs.CanCollide = false | |
167 | acs.CFrame = PART.CFrame | |
168 | local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET) | |
169 | weldBetween(PART,acs) | |
170 | elseif TYPE == "Eye" then | |
171 | local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0)) | |
172 | acs.Anchored = false | |
173 | acs.CanCollide = false | |
174 | acs.CFrame = PART.CFrame | |
175 | local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET) | |
176 | weldBetween(PART,acs) | |
177 | end | |
178 | end | |
179 | ||
180 | --//=================================\\ | |
181 | --|| USEFUL VALUES | |
182 | --\\=================================// | |
183 | ||
184 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
185 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
186 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
187 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
188 | local CO1 = 0 | |
189 | local CO2 = 0 | |
190 | local CO3 = 0 | |
191 | local CO4 = 0 | |
192 | local CHANGEDEFENSE = 0 | |
193 | local CHANGEDAMAGE = 0 | |
194 | local CHANGEMOVEMENT = 0 | |
195 | local ANIM = "Idle" | |
196 | local ATTACK = false | |
197 | local EQUIPPED = false | |
198 | local HOLD = false | |
199 | local COMBO = 1 | |
200 | local LASTPOINT = nil | |
201 | local BLCF = nil | |
202 | local SCFR = nil | |
203 | local STAGGERHITANIM = false | |
204 | local STAGGERANIM = false | |
205 | local STUNANIM = false | |
206 | local CRITCHANCENUMBER = 0 | |
207 | local IDLENUMBER = 0 | |
208 | local DONUMBER = 0 | |
209 | local HANDIDLE = false | |
210 | local SINE = 0 | |
211 | local CHANGE = 2 / Animation_Speed | |
212 | local WALKINGANIM = false | |
213 | local WALK = 0 | |
214 | local DISABLEJUMPING = false | |
215 | local HASBEENBLOCKED = false | |
216 | local STUNDELAYNUMBER = 0 | |
217 | local MANADELAYNUMBER = 0 | |
218 | local SECONDARYMANADELAYNUMBER = 0 | |
219 | local ROBLOXIDLEANIMATION = IT("Animation") | |
220 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
221 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
222 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
223 | local WEAPONGUI = IT("ScreenGui", nil) | |
224 | WEAPONGUI.Name = "Weapon GUI" | |
225 | local WEAPONTOOL = IT("HopperBin", nil) | |
226 | WEAPONTOOL.Name = Weapon_Name | |
227 | local Weapon = IT("Model") | |
228 | Weapon.Name = Weapon_Name | |
229 | local Effects = IT("Folder", Weapon) | |
230 | Effects.Name = "Effects" | |
231 | local ANIMATOR = Humanoid.Animator | |
232 | local ANIMATE = Character.Animate | |
233 | local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"} | |
234 | local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"} | |
235 | local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"} | |
236 | local HITBLOCKSOUNDS = {"199148933", "199148947"} | |
237 | local UNANCHOR = true | |
238 | ||
239 | --//=================================\\ | |
240 | --\\=================================// | |
241 | ||
242 | --//=================================\\ | |
243 | --|| STATS | |
244 | --\\=================================// | |
245 | ||
246 | if Character:FindFirstChild("Stats") ~= nil then | |
247 | Character:FindFirstChild("Stats").Parent = nil | |
248 | end | |
249 | ||
250 | local Stats = IT("Folder", nil) | |
251 | Stats.Name = "Stats" | |
252 | local ChangeStat = IT("Folder", Stats) | |
253 | ChangeStat.Name = "ChangeStat" | |
254 | local Defense = IT("NumberValue", Stats) | |
255 | Defense.Name = "Defense" | |
256 | Defense.Value = 1 | |
257 | local Movement = IT("NumberValue", Stats) | |
258 | Movement.Name = "Movement" | |
259 | Movement.Value = 1 | |
260 | local Damage = IT("NumberValue", Stats) | |
261 | Damage.Name = "Damage" | |
262 | Damage.Value = 1 | |
263 | local Mana = IT("NumberValue", Stats) | |
264 | Mana.Name = "Mana" | |
265 | Mana.Value = 0 | |
266 | local SecondaryMana = IT("NumberValue", Stats) | |
267 | SecondaryMana.Name = "SecondaryMana" | |
268 | SecondaryMana.Value = 0 | |
269 | local CanCrit = IT("BoolValue", Stats) | |
270 | CanCrit.Name = "CanCrit" | |
271 | CanCrit.Value = false | |
272 | local CritChance = IT("NumberValue", Stats) | |
273 | CritChance.Name = "CritChance" | |
274 | CritChance.Value = 20 | |
275 | local CanPenetrateArmor = IT("BoolValue", Stats) | |
276 | CanPenetrateArmor.Name = "CanPenetrateArmor" | |
277 | CanPenetrateArmor.Value = false | |
278 | local AntiTeamKill = IT("BoolValue", Stats) | |
279 | AntiTeamKill.Name = "AntiTeamKill" | |
280 | AntiTeamKill.Value = false | |
281 | local Rooted = IT("BoolValue", Stats) | |
282 | Rooted.Name = "Rooted" | |
283 | Rooted.Value = false | |
284 | local Block = IT("BoolValue", Stats) | |
285 | Block.Name = "Block" | |
286 | Block.Value = false | |
287 | local RecentEnemy = IT("ObjectValue", Stats) | |
288 | RecentEnemy.Name = "RecentEnemy" | |
289 | RecentEnemy.Value = nil | |
290 | local StaggerHit = IT("BoolValue", Stats) | |
291 | StaggerHit.Name = "StaggerHit" | |
292 | StaggerHit.Value = false | |
293 | local Stagger = IT("BoolValue", Stats) | |
294 | Stagger.Name = "Stagger" | |
295 | Stagger.Value = false | |
296 | local Stun = IT("BoolValue", Stats) | |
297 | Stun.Name = "Stun" | |
298 | Stun.Value = false | |
299 | local StunValue = IT("NumberValue", Stats) | |
300 | StunValue.Name = "StunValue" | |
301 | StunValue.Value = 0 | |
302 | ||
303 | ||
304 | --//=================================\\ | |
305 | --\\=================================// | |
306 | ||
307 | ||
308 | abss = Instance.new("BillboardGui") | |
309 | abss.Size = UDim2.new(10,0,10,0) | |
310 | abss.Enabled = false | |
311 | abss.AlwaysOnTop = true | |
312 | img2 = Instance.new("ImageLabel",abss) | |
313 | img2.Position = UDim2.new(0.35,0,0.35,0) | |
314 | img2.Size = UDim2.new(0.3,0,0.3,0) | |
315 | img2.Image = "rbxassetid://108413215" | |
316 | img2.BackgroundTransparency = 1 | |
317 | img2.ImageColor3 = Color3.new(1,1,1) | |
318 | ||
319 | local boop = nil | |
320 | ||
321 | ||
322 | --//=================================\\ | |
323 | --|| DEBUFFS / BUFFS | |
324 | --\\=================================// | |
325 | ||
326 | local DEFENSECHANGE1 = IT("NumberValue", ChangeStat) | |
327 | DEFENSECHANGE1.Name = "ChangeDefense" | |
328 | DEFENSECHANGE1.Value = 0 | |
329 | ||
330 | local MOVEMENTCHANGE1 = IT("NumberValue", nil) | |
331 | MOVEMENTCHANGE1.Name = "ChangeMovement" | |
332 | MOVEMENTCHANGE1.Value = 0 | |
333 | ||
334 | --//=================================\\ | |
335 | --\\=================================// | |
336 | ||
337 | ||
338 | ||
339 | ||
340 | ||
341 | --//=================================\\ | |
342 | --|| SAZERENOS' ARTIFICIAL HEARTBEAT | |
343 | --\\=================================// | |
344 | ||
345 | ArtificialHB = Instance.new("BindableEvent", script) | |
346 | ArtificialHB.Name = "ArtificialHB" | |
347 | ||
348 | script:WaitForChild("ArtificialHB") | |
349 | ||
350 | frame = Frame_Speed | |
351 | tf = 0 | |
352 | allowframeloss = false | |
353 | tossremainder = false | |
354 | lastframe = tick() | |
355 | script.ArtificialHB:Fire() | |
356 | ||
357 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
358 | tf = tf + s | |
359 | if tf >= frame then | |
360 | if allowframeloss then | |
361 | script.ArtificialHB:Fire() | |
362 | lastframe = tick() | |
363 | else | |
364 | for i = 1, math.floor(tf / frame) do | |
365 | script.ArtificialHB:Fire() | |
366 | end | |
367 | lastframe = tick() | |
368 | end | |
369 | if tossremainder then | |
370 | tf = 0 | |
371 | else | |
372 | tf = tf - frame * math.floor(tf / frame) | |
373 | end | |
374 | end | |
375 | end) | |
376 | ||
377 | --//=================================\\ | |
378 | --\\=================================// | |
379 | ||
380 | ||
381 | ||
382 | ||
383 | ||
384 | --//=================================\\ | |
385 | --|| SOME FUNCTIONS | |
386 | --\\=================================// | |
387 | ||
388 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
389 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
390 | end | |
391 | ||
392 | function PositiveAngle(NUMBER) | |
393 | if NUMBER >= 0 then | |
394 | NUMBER = 0 | |
395 | end | |
396 | return NUMBER | |
397 | end | |
398 | ||
399 | function NegativeAngle(NUMBER) | |
400 | if NUMBER <= 0 then | |
401 | NUMBER = 0 | |
402 | end | |
403 | return NUMBER | |
404 | end | |
405 | ||
406 | function Swait(NUMBER) | |
407 | if NUMBER == 0 or NUMBER == nil then | |
408 | ArtificialHB.Event:wait() | |
409 | else | |
410 | for i = 1, NUMBER do | |
411 | ArtificialHB.Event:wait() | |
412 | end | |
413 | end | |
414 | end | |
415 | ||
416 | function QuaternionFromCFrame(cf) | |
417 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
418 | local trace = m00 + m11 + m22 | |
419 | if trace > 0 then | |
420 | local s = math.sqrt(1 + trace) | |
421 | local recip = 0.5 / s | |
422 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
423 | else | |
424 | local i = 0 | |
425 | if m11 > m00 then | |
426 | i = 1 | |
427 | end | |
428 | if m22 > (i == 0 and m00 or m11) then | |
429 | i = 2 | |
430 | end | |
431 | if i == 0 then | |
432 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
433 | local recip = 0.5 / s | |
434 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
435 | elseif i == 1 then | |
436 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
437 | local recip = 0.5 / s | |
438 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
439 | elseif i == 2 then | |
440 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
441 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
442 | end | |
443 | end | |
444 | end | |
445 | ||
446 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
447 | local xs, ys, zs = x + x, y + y, z + z | |
448 | local wx, wy, wz = w * xs, w * ys, w * zs | |
449 | local xx = x * xs | |
450 | local xy = x * ys | |
451 | local xz = x * zs | |
452 | local yy = y * ys | |
453 | local yz = y * zs | |
454 | local zz = z * zs | |
455 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
456 | end | |
457 | ||
458 | function QuaternionSlerp(a, b, t) | |
459 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
460 | local startInterp, finishInterp; | |
461 | if cosTheta >= 0.0001 then | |
462 | if (1 - cosTheta) > 0.0001 then | |
463 | local theta = ACOS(cosTheta) | |
464 | local invSinTheta = 1 / SIN(theta) | |
465 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
466 | finishInterp = SIN(t * theta) * invSinTheta | |
467 | else | |
468 | startInterp = 1 - t | |
469 | finishInterp = t | |
470 | end | |
471 | else | |
472 | if (1 + cosTheta) > 0.0001 then | |
473 | local theta = ACOS(-cosTheta) | |
474 | local invSinTheta = 1 / SIN(theta) | |
475 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
476 | finishInterp = SIN(t * theta) * invSinTheta | |
477 | else | |
478 | startInterp = t - 1 | |
479 | finishInterp = t | |
480 | end | |
481 | end | |
482 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
483 | end | |
484 | ||
485 | function Clerp(a, b, t) | |
486 | local qa = {QuaternionFromCFrame(a)} | |
487 | local qb = {QuaternionFromCFrame(b)} | |
488 | local ax, ay, az = a.x, a.y, a.z | |
489 | local bx, by, bz = b.x, b.y, b.z | |
490 | local _t = 1 - t | |
491 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
492 | end | |
493 | ||
494 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
495 | local frame = IT("Frame") | |
496 | frame.BackgroundTransparency = TRANSPARENCY | |
497 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
498 | frame.Position = POSITION | |
499 | frame.Size = SIZE | |
500 | frame.BackgroundColor3 = COLOR | |
501 | frame.BorderColor3 = BORDERCOLOR | |
502 | frame.Name = NAME | |
503 | frame.Parent = PARENT | |
504 | return frame | |
505 | end | |
506 | ||
507 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
508 | local label = IT("TextLabel") | |
509 | label.BackgroundTransparency = 1 | |
510 | label.Size = UD2(1, 0, 1, 0) | |
511 | label.Position = UD2(0, 0, 0, 0) | |
512 | label.TextColor3 = C3(255, 255, 255) | |
513 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
514 | label.TextTransparency = TRANSPARENCY | |
515 | label.FontSize = TEXTFONTSIZE | |
516 | label.Font = TEXTFONT | |
517 | label.BorderSizePixel = BORDERSIZEPIXEL | |
518 | label.TextScaled = true | |
519 | label.Text = TEXT | |
520 | label.Name = NAME | |
521 | label.Parent = PARENT | |
522 | return label | |
523 | end | |
524 | ||
525 | function NoOutlines(PART) | |
526 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
527 | end | |
528 | ||
529 | ||
530 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
531 | local NEWWELD = IT(TYPE) | |
532 | NEWWELD.Part0 = PART0 | |
533 | NEWWELD.Part1 = PART1 | |
534 | NEWWELD.C0 = C0 | |
535 | NEWWELD.C1 = C1 | |
536 | NEWWELD.Parent = PARENT | |
537 | return NEWWELD | |
538 | end | |
539 | ||
540 | function CreateSound(ID, PARENT, VOLUME, PITCH) | |
541 | coroutine.resume(coroutine.create(function() | |
542 | local NEWSOUND = IT("Sound", PARENT) | |
543 | NEWSOUND.Volume = VOLUME | |
544 | NEWSOUND.Pitch = PITCH | |
545 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
546 | Swait() | |
547 | NEWSOUND:play() | |
548 | game:GetService("Debris"):AddItem(NEWSOUND, 10) | |
549 | end)) | |
550 | end | |
551 | ||
552 | function CFrameFromTopBack(at, top, back) | |
553 | local right = top:Cross(back) | |
554 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
555 | end | |
556 | ||
557 | function Lightning(POSITION1, POSITION2, MULTIPLIERTIME, LIGHTNINGDELAY, OFFSET, BRICKCOLOR, MATERIAL, SIZE, TRANSPARENCY, LASTINGTIME) | |
558 | local MAGNITUDE = (POSITION1 - POSITION2).magnitude | |
559 | local CURRENTPOSITION = POSITION1 | |
560 | local LIGHTNINGOFFSET = {-OFFSET, OFFSET} | |
561 | coroutine.resume(coroutine.create(function() | |
562 | for i = 1, MULTIPLIERTIME do | |
563 | local LIGHTNINGPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR,"Effect", VT(SIZE * Player_Size, SIZE * Player_Size, MAGNITUDE / MULTIPLIERTIME)) | |
564 | LIGHTNINGPART.Anchored = true | |
565 | local LIGHTNINGOFFSET2 = VT(LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)], LIGHTNINGOFFSET[MRANDOM(1, 2)]) | |
566 | local LIGHTNINGPOSITION1 = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME).p + LIGHTNINGOFFSET2 | |
567 | if MULTIPLIERTIME == i then | |
568 | local LIGHTNINGMAGNITUDE1 = (CURRENTPOSITION - POSITION2).magnitude | |
569 | LIGHTNINGPART.Size = VT(SIZE * Player_Size, SIZE * Player_Size, LIGHTNINGMAGNITUDE1) | |
570 | LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, POSITION2) * CF(0, 0, -LIGHTNINGMAGNITUDE1 / 2) | |
571 | else | |
572 | LIGHTNINGPART.CFrame = CF(CURRENTPOSITION, LIGHTNINGPOSITION1) * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2) | |
573 | end | |
574 | CURRENTPOSITION=LIGHTNINGPART.CFrame * CF(0, 0, MAGNITUDE / MULTIPLIERTIME / 2).p | |
575 | game.Debris:AddItem(LIGHTNINGPART, LASTINGTIME) | |
576 | coroutine.resume(coroutine.create(function() | |
577 | while LIGHTNINGPART.Transparency ~= 1 do | |
578 | --local StartTransparency = tra | |
579 | for i=0, 1, LASTINGTIME do | |
580 | Swait() | |
581 | LIGHTNINGPART.Transparency = LIGHTNINGPART.Transparency + (0.1 / LASTINGTIME) | |
582 | end | |
583 | end | |
584 | end)) | |
585 | Swait(LIGHTNINGDELAY / Animation_Speed) | |
586 | end | |
587 | end)) | |
588 | end | |
589 | ||
590 | function MagicBlock(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
591 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
592 | EFFECTPART.Anchored = true | |
593 | EFFECTPART.CFrame = CFRAME | |
594 | local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
595 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
596 | coroutine.resume(coroutine.create(function(PART, MESH) | |
597 | for i = 0, 1, delay do | |
598 | Swait() | |
599 | PART.CFrame = PART.CFrame * ROTATION | |
600 | PART.Transparency = i | |
601 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
602 | end | |
603 | PART.Parent = nil | |
604 | end), EFFECTPART, EFFECTMESH) | |
605 | end | |
606 | ||
607 | function MagicSphere(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
608 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
609 | EFFECTPART.Anchored = true | |
610 | EFFECTPART.CFrame = CFRAME | |
611 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Sphere", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
612 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
613 | coroutine.resume(coroutine.create(function(PART, MESH) | |
614 | for i = 0, 1, delay do | |
615 | Swait() | |
616 | PART.CFrame = PART.CFrame * ROTATION | |
617 | PART.Transparency = i | |
618 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
619 | end | |
620 | PART.Parent = nil | |
621 | end), EFFECTPART, EFFECTMESH) | |
622 | end | |
623 | ||
624 | function MagicCylinder(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
625 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
626 | EFFECTPART.Anchored = true | |
627 | EFFECTPART.CFrame = CFRAME | |
628 | local EFFECTMESH = CreateMesh("CylinderMesh", EFFECTPART, "", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
629 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
630 | coroutine.resume(coroutine.create(function(PART, MESH) | |
631 | for i = 0, 1, delay do | |
632 | Swait() | |
633 | PART.CFrame = PART.CFrame * ROTATION | |
634 | PART.Transparency = i | |
635 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
636 | end | |
637 | PART.Parent = nil | |
638 | end), EFFECTPART, EFFECTMESH) | |
639 | end | |
640 | ||
641 | function MagicHead(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
642 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
643 | EFFECTPART.Anchored = true | |
644 | EFFECTPART.CFrame = CFRAME | |
645 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "Head", "", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
646 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
647 | coroutine.resume(coroutine.create(function(PART, MESH) | |
648 | for i = 0, 1, delay do | |
649 | Swait() | |
650 | PART.CFrame = PART.CFrame * ROTATION | |
651 | PART.Transparency = i | |
652 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
653 | end | |
654 | PART.Parent = nil | |
655 | end), EFFECTPART, EFFECTMESH) | |
656 | end | |
657 | ||
658 | function MagicRing(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
659 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
660 | EFFECTPART.Anchored = true | |
661 | EFFECTPART.CFrame = CFRAME | |
662 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "3270017", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
663 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
664 | coroutine.resume(coroutine.create(function(PART, MESH) | |
665 | for i = 0, 1, delay do | |
666 | Swait() | |
667 | PART.CFrame = PART.CFrame * ROTATION | |
668 | PART.Transparency = i | |
669 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
670 | end | |
671 | PART.Parent = nil | |
672 | end), EFFECTPART, EFFECTMESH) | |
673 | end | |
674 | ||
675 | function MagicWave(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
676 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
677 | EFFECTPART.Anchored = true | |
678 | EFFECTPART.CFrame = CFRAME | |
679 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "20329976", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), VT(0, 0, (-0.1 * Z1)) + (OFFSET * Player_Size)) | |
680 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
681 | coroutine.resume(coroutine.create(function(PART, MESH) | |
682 | for i = 0, 1, delay do | |
683 | Swait() | |
684 | PART.CFrame = PART.CFrame * ROTATION | |
685 | PART.Transparency = i | |
686 | MESH.Offset = VT(0, 0, (-0.1 * MESH.Scale.Z)) | |
687 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
688 | end | |
689 | PART.Parent = nil | |
690 | end), EFFECTPART, EFFECTMESH) | |
691 | end | |
692 | ||
693 | function MagicCrystal(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
694 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
695 | EFFECTPART.Anchored = true | |
696 | EFFECTPART.CFrame = CFRAME | |
697 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "9756362", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
698 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
699 | coroutine.resume(coroutine.create(function(PART, MESH) | |
700 | for i = 0, 1, delay do | |
701 | Swait() | |
702 | PART.CFrame = PART.CFrame * ROTATION | |
703 | PART.Transparency = i | |
704 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
705 | end | |
706 | PART.Parent = nil | |
707 | end), EFFECTPART, EFFECTMESH) | |
708 | end | |
709 | ||
710 | function MagicSwirl(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
711 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
712 | EFFECTPART.Anchored = true | |
713 | EFFECTPART.CFrame = CFRAME | |
714 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1051557", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
715 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
716 | coroutine.resume(coroutine.create(function(PART, MESH) | |
717 | for i = 0, 1, delay do | |
718 | Swait() | |
719 | PART.CFrame = PART.CFrame * ROTATION | |
720 | PART.Transparency = i | |
721 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
722 | end | |
723 | PART.Parent = nil | |
724 | end), EFFECTPART, EFFECTMESH) | |
725 | end | |
726 | ||
727 | function MagicSharpCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
728 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
729 | EFFECTPART.Anchored = true | |
730 | EFFECTPART.CFrame = CFRAME | |
731 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1778999", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
732 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
733 | coroutine.resume(coroutine.create(function(PART, MESH) | |
734 | for i = 0, 1, delay do | |
735 | Swait() | |
736 | PART.CFrame = PART.CFrame * ROTATION | |
737 | PART.Transparency = i | |
738 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
739 | end | |
740 | PART.Parent = nil | |
741 | end), EFFECTPART, EFFECTMESH) | |
742 | end | |
743 | ||
744 | function MagicFlatCone(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
745 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
746 | EFFECTPART.Anchored = true | |
747 | EFFECTPART.CFrame = CFRAME | |
748 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1033714", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
749 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
750 | coroutine.resume(coroutine.create(function(PART, MESH) | |
751 | for i = 0, 1, delay do | |
752 | Swait() | |
753 | PART.CFrame = PART.CFrame * ROTATION | |
754 | PART.Transparency = i | |
755 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
756 | end | |
757 | PART.Parent = nil | |
758 | end), EFFECTPART, EFFECTMESH) | |
759 | end | |
760 | ||
761 | function MagicSpikedCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
762 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
763 | EFFECTPART.Anchored = true | |
764 | EFFECTPART.CFrame = CFRAME | |
765 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1323306", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
766 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
767 | coroutine.resume(coroutine.create(function(PART, MESH) | |
768 | for i = 0, 1, delay do | |
769 | Swait() | |
770 | PART.CFrame = PART.CFrame * ROTATION | |
771 | PART.Transparency = i | |
772 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
773 | end | |
774 | PART.Parent = nil | |
775 | end), EFFECTPART, EFFECTMESH) | |
776 | end | |
777 | ||
778 | function MagicFlatCrown(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
779 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
780 | EFFECTPART.Anchored = true | |
781 | EFFECTPART.CFrame = CFRAME | |
782 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "1078075", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
783 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
784 | coroutine.resume(coroutine.create(function(PART, MESH) | |
785 | for i = 0, 1, delay do | |
786 | Swait() | |
787 | PART.CFrame = PART.CFrame * ROTATION | |
788 | PART.Transparency = i | |
789 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
790 | end | |
791 | PART.Parent = nil | |
792 | end), EFFECTPART, EFFECTMESH) | |
793 | end | |
794 | ||
795 | function MagicSkull(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X1, Y1, Z1, X2, Y2, Z2, delay) | |
796 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
797 | EFFECTPART.Anchored = true | |
798 | EFFECTPART.CFrame = CFRAME | |
799 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X1 * Player_Size, Y1 * Player_Size, Z1 * Player_Size), OFFSET * Player_Size) | |
800 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
801 | coroutine.resume(coroutine.create(function(PART, MESH) | |
802 | for i = 0, 1, delay do | |
803 | Swait() | |
804 | PART.CFrame = PART.CFrame * ROTATION | |
805 | PART.Transparency = i | |
806 | MESH.Scale = MESH.Scale + VT(X2 * Player_Size, Y2 * Player_Size, Z2 * Player_Size) | |
807 | end | |
808 | PART.Parent = nil | |
809 | end), EFFECTPART, EFFECTMESH) | |
810 | end | |
811 | ||
812 | function ElectricEffect(BRICKCOLOR, MATERIAL, CFRAME, ROTATION, OFFSET, X, Y, Z, delay) | |
813 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT()) | |
814 | EFFECTPART.Anchored = true | |
815 | EFFECTPART.CFrame = CFRAME | |
816 | local EFFECTMESH = CreateMesh("SpecialMesh", EFFECTPART, "FileMesh", "4770583", "", VT(X * Player_Size, Y * Player_Size, Z * Player_Size), OFFSET * Player_Size) | |
817 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
818 | local XVALUE = MRANDOM() | |
819 | local YVALUE = MRANDOM() | |
820 | local ZVALUE = MRANDOM() | |
821 | coroutine.resume(coroutine.create(function(PART, MESH, THEXVALUE, THEYVALUE, THEZVALUE) | |
822 | for i = 0, 1, delay do | |
823 | Swait() | |
824 | PART.CFrame = PART.CFrame * ROTATION | |
825 | PART.Transparency = i | |
826 | THEXVALUE = THEXVALUE - 0.1 * (delay * 10) | |
827 | THEYVALUE = THEYVALUE - 0.1 * (delay * 10) | |
828 | THEZVALUE = THEZVALUE - 0.1 * (delay * 10) | |
829 | MESH.Scale = MESH.Scale + VT(THEXVALUE * Player_Size, THEYVALUE * Player_Size, THEZVALUE * Player_Size) | |
830 | end | |
831 | PART.Parent = nil | |
832 | end), EFFECTPART, EFFECTMESH, XVALUE, YVALUE, ZVALUE) | |
833 | end | |
834 | ||
835 | function TrailEffect(BRICKCOLOR, MATERIAL, CURRENTCFRAME, OLDCFRAME, MESHTYPE, REFLECTANCE, SIZE, ROTATION, X, Y, Z, delay) | |
836 | local MAGNITUDECFRAME = (CURRENTCFRAME.p - OLDCFRAME.p).magnitude | |
837 | if MAGNITUDECFRAME > (1 / 100) then | |
838 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 0, BRICKCOLOR, "Effect", VT(1, MAGNITUDECFRAME, 1)) | |
839 | EFFECTPART.Anchored = true | |
840 | EFFECTPART.CFrame = CF((CURRENTCFRAME.p + OLDCFRAME.p) / 2, OLDCFRAME.p) * ANGLES(RAD(90), 0, 0) | |
841 | local THEMESHTYPE = "BlockMesh" | |
842 | if MESHTYPE == "Cylinder" then | |
843 | THEMESHTYPE = "CylinderMesh" | |
844 | end | |
845 | local EFFECTMESH = CreateMesh(THEMESHTYPE, EFFECTPART, "", "", "", VT(0 + SIZE * Player_Size, 1, 0 + SIZE * Player_Size), VT(0, 0, 0)) | |
846 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
847 | coroutine.resume(coroutine.create(function(PART, MESH) | |
848 | for i = 0, 1, delay do | |
849 | Swait() | |
850 | PART.CFrame = PART.CFrame * ROTATION | |
851 | PART.Transparency = i | |
852 | MESH.Scale = MESH.Scale + VT(X * Player_Size, Y * Player_Size, Z * Player_Size) | |
853 | end | |
854 | PART.Parent = nil | |
855 | end), EFFECTPART, EFFECTMESH) | |
856 | end | |
857 | end | |
858 | ||
859 | function ClangEffect(BRICKCOLOR, MATERIAL, CFRAME, ANGLE, DURATION, SIZE, POWER, REFLECTANCE, X, Y, Z, delay) | |
860 | local EFFECTPART = CreatePart(3, Effects, MATERIAL, 0, 1, BRICKCOLOR, "Effect", VT()) | |
861 | EFFECTPART.Anchored = true | |
862 | EFFECTPART.CFrame = CFRAME | |
863 | local EFFECTMESH = CreateMesh("BlockMesh", EFFECTPART, "", "", "", VT(0, 0, 0), VT(0, 0, 0)) | |
864 | game:GetService("Debris"):AddItem(EFFECTPART, 10) | |
865 | local THELASTPOINT = CFRAME | |
866 | coroutine.resume(coroutine.create(function(PART) | |
867 | for i = 1, DURATION do | |
868 | Swait() | |
869 | PART.CFrame = PART.CFrame * ANGLES(RAD(ANGLE), 0, 0) * CF(0, POWER * Player_Size, 0) | |
870 | TrailEffect(BRICKCOLOR, MATERIAL, PART.CFrame, THELASTPOINT, "Cylinder", REFLECTANCE, SIZE * Player_Size, ANGLES(0, 0, 0), X * Player_Size, Y * Player_Size, Z * Player_Size, delay) | |
871 | THELASTPOINT = PART.CFrame | |
872 | end | |
873 | PART.Parent = nil | |
874 | end), EFFECTPART) | |
875 | end | |
876 | ||
877 | --local list={} | |
878 | function Triangle(Color, Material, a, b, c, delay) | |
879 | local edge1 = (c - a):Dot((b - a).unit) | |
880 | local edge2 = (a - b):Dot((c - b).unit) | |
881 | local edge3 = (b - c):Dot((a - c).unit) | |
882 | if edge1 <= (b - a).magnitude and edge1 >= 0 then | |
883 | a, b, c=a, b, c | |
884 | elseif edge2 <= (c - b).magnitude and edge2 >= 0 then | |
885 | a, b, c=b, c, a | |
886 | elseif edge3 <= (a - c).magnitude and edge3 >= 0 then | |
887 | a, b, c=c, a, b | |
888 | else | |
889 | assert(false, "unreachable") | |
890 | end | |
891 | local len1 = (c - a):Dot((b - a).unit) | |
892 | local len2 = (b - a).magnitude - len1 | |
893 | local width = (a + (b - a).unit * len1 - c).magnitude | |
894 | local maincf = CFrameFromTopBack(a, (b - a):Cross(c - b).unit, - (b - a).unit) | |
895 | if len1 > 1 / 100 then | |
896 | local sz = VT(0.2, width, len1) | |
897 | local w1 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz) | |
898 | local sp = CreateMesh("SpecialMesh", w1, "Wedge", "", "", VT(0, 1, 1) * sz / w1.Size, VT(0, 0, 0)) | |
899 | w1.Anchored = true | |
900 | w1.CFrame = maincf * ANGLES(math.pi, 0, math.pi / 2) * CF(0, width / 2, len1 / 2) | |
901 | coroutine.resume(coroutine.create(function() | |
902 | for i = 0.5, 1, delay * (2 / Animation_Speed) do | |
903 | Swait() | |
904 | w1.Transparency = i | |
905 | end | |
906 | w1.Parent = nil | |
907 | end)) | |
908 | game:GetService("Debris"):AddItem(w1, 10) | |
909 | --table.insert(list, w1) | |
910 | end | |
911 | if len2 > 1 / 100 then | |
912 | local sz = VT(0.2, width, len2) | |
913 | local w2 = CreatePart(3, Effects, Material, 0, 0.5, Color, "Trail", sz) | |
914 | local sp = CreateMesh("SpecialMesh", w2, "Wedge", "", "", VT(0, 1, 1) * sz / w2.Size, VT(0, 0, 0)) | |
915 | w2.Anchored = true | |
916 | w2.CFrame = maincf * ANGLES(math.pi, math.pi, -math.pi / 2) * CF(0, width / 2, -len1 - len2 / 2) | |
917 | coroutine.resume(coroutine.create(function() | |
918 | for i = 0.5, 1, delay * (2 / Animation_Speed) do | |
919 | Swait() | |
920 | w2.Transparency = i | |
921 | end | |
922 | w2.Parent = nil | |
923 | end)) | |
924 | game:GetService("Debris"):AddItem(w2, 10) | |
925 | --table.insert(list, w2) | |
926 | end | |
927 | --return unpack(list) | |
928 | end | |
929 | ||
930 | --[[Usage: | |
931 | local Pos = Part | |
932 | local Offset = Part.CFrame * CF(0, 0, 0) | |
933 | local Color = "Institutional white" | |
934 | local Material = "Neon" | |
935 | local TheDelay = 0.01 | |
936 | local Height = 4 | |
937 | BLCF = Offset | |
938 | if SCFR and (Pos.Position - SCFR.p).magnitude > 0.1 then | |
939 | local a, b = Triangle(Color, Material, (SCFR * CF(0, Height / 2,0)).p, (SCFR * CF(0, -Height / 2, 0)).p, (BLCF * CF(0, Height / 2,0)).p, TheDelay) | |
940 | if a then game:GetService("Debris"):AddItem(a, 1) end | |
941 | if b then game:GetService("Debris"):AddItem(b, 1) end | |
942 | local a, b = Triangle(Color, Material, (BLCF * CF(0, Height / 2, 0)).p, (BLCF * CF(0, -Height / 2, 0)).p, (SCFR * CF(0, -Height / 2, 0)).p, TheDelay) | |
943 | if a then game:GetService("Debris"):AddItem(a, 1) end | |
944 | if b then game:GetService("Debris"):AddItem(b, 1) end | |
945 | SCFR = BLCF | |
946 | elseif not SCFR then | |
947 | SCFR = BLCF | |
948 | end | |
949 | -- | |
950 | BLCF = nil | |
951 | SCFR = nil | |
952 | --]] | |
953 | ||
954 | --//=================================\\ | |
955 | --\\=================================// | |
956 | ||
957 | ||
958 | --//=================================\\ | |
959 | --|| WEAPON CREATION | |
960 | --\\=================================// | |
961 | ||
962 | if Player_Size ~= 1 then | |
963 | for _, v in pairs (Weapon:GetChildren()) do | |
964 | if v.ClassName == "Motor" or v.ClassName == "Weld" or v.ClassName == "Snap" then | |
965 | local p1 = v.Part1 | |
966 | v.Part1 = nil | |
967 | local cf1, cf2, cf3, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12 = v.C1:components() | |
968 | v.C1 = CF(cf1 * Player_Size, cf2 * Player_Size, cf3 * Player_Size, cf4, cf5, cf6, cf7, cf8, cf9, cf10, cf11, cf12) | |
969 | v.Part1 = p1 | |
970 | elseif v.ClassName == "Part" then | |
971 | for _, b in pairs (v:GetChildren()) do | |
972 | if b.ClassName == "SpecialMesh" or b.ClassName == "BlockMesh" then | |
973 | b.Scale = VT(b.Scale.x * Player_Size, b.Scale.y * Player_Size, b.Scale.z * Player_Size) | |
974 | end | |
975 | end | |
976 | end | |
977 | end | |
978 | end | |
979 | ||
980 | for _, c in pairs(Weapon:GetChildren()) do | |
981 | if c.ClassName == "Part" then | |
982 | c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0) | |
983 | end | |
984 | end | |
985 | ||
986 | Weapon.Parent = Character | |
987 | ||
988 | Humanoid.Died:connect(function() | |
989 | ATTACK = true | |
990 | end) | |
991 | ||
992 | print(Class_Name.." loaded.") | |
993 | ||
994 | --//=================================\\ | |
995 | --\\=================================// | |
996 | ||
997 | ||
998 | ||
999 | ||
1000 | ||
1001 | --//=================================\\ | |
1002 | --|| DAMAGE FUNCTIONS | |
1003 | --\\=================================// | |
1004 | ||
1005 | function StatLabel(LABELTYPE, CFRAME, TEXT, COLOR) | |
1006 | local STATPART = CreatePart(3, Effects, "SmoothPlastic", 0, 1, "Really black", "Effect", VT()) | |
1007 | STATPART.CFrame = CF(CFRAME.p + VT(0, 1.5, 0)) | |
1008 | local BODYGYRO = IT("BodyGyro", STATPART) | |
1009 | local BODYPOSITION = IT("BodyPosition", STATPART) | |
1010 | BODYPOSITION.P = 2000 | |
1011 | BODYPOSITION.D = 100 | |
1012 | BODYPOSITION.maxForce = VT(math.huge, math.huge, math.huge) | |
1013 | if LABELTYPE == "Normal" then | |
1014 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 6, MRANDOM(-2, 2)) | |
1015 | elseif LABELTYPE == "Debuff" then | |
1016 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2, 2), 8, MRANDOM(-2, 2)) | |
1017 | elseif LABELTYPE == "Interruption" then | |
1018 | BODYPOSITION.position = STATPART.Position + VT(MRANDOM(-2,2), 8, MRANDOM(-2, 2)) | |
1019 | end | |
1020 | game:GetService("Debris"):AddItem(STATPART ,5) | |
1021 | local BILLBOARDGUI = Instance.new("BillboardGui", STATPART) | |
1022 | BILLBOARDGUI.Adornee = STATPART | |
1023 | BILLBOARDGUI.Size = UD2(2.5, 0, 2.5 ,0) | |
1024 | BILLBOARDGUI.StudsOffset = VT(-2, 2, 0) | |
1025 | BILLBOARDGUI.AlwaysOnTop = false | |
1026 | local TEXTLABEL = Instance.new("TextLabel", BILLBOARDGUI) | |
1027 | TEXTLABEL.BackgroundTransparency = 1 | |
1028 | TEXTLABEL.Size = UD2(2.5, 0, 2.5, 0) | |
1029 | TEXTLABEL.Text = TEXT | |
1030 | TEXTLABEL.Font = "SciFi" | |
1031 | TEXTLABEL.FontSize="Size42" | |
1032 | TEXTLABEL.TextColor3 = COLOR | |
1033 | TEXTLABEL.TextStrokeTransparency = 1 | |
1034 | TEXTLABEL.TextScaled = true | |
1035 | TEXTLABEL.TextWrapped = true | |
1036 | coroutine.resume(coroutine.create(function(THEPART, THEBODYPOSITION, THETEXTLABEL) | |
1037 | wait(0.2) | |
1038 | for i=1, 5 do | |
1039 | wait() | |
1040 | THEBODYPOSITION.Position = THEPART.Position - VT(0, 0.5 ,0) | |
1041 | end | |
1042 | wait(1.2) | |
1043 | for i=1, 5 do | |
1044 | wait() | |
1045 | THETEXTLABEL.TextTransparency = THETEXTLABEL.TextTransparency + 0.2 | |
1046 | THETEXTLABEL.TextStrokeTransparency = THETEXTLABEL.TextStrokeTransparency + 0.2 | |
1047 | THEBODYPOSITION.position = THEPART.Position + VT(0, 0.5, 0) | |
1048 | end | |
1049 | THEPART.Parent = nil | |
1050 | end),STATPART, BODYPOSITION, TEXTLABEL) | |
1051 | end | |
1052 | ||
1053 | ||
1054 | --//=================================\\ | |
1055 | --|| DAMAGING | |
1056 | --\\=================================// | |
1057 | ||
1058 | ||
1059 | ||
1060 | function dealdamage(hit,min,max,maxstrength,beserk,critrate,critmultiplier) | |
1061 | if hit.Parent ~= Character and hit.Parent:FindFirstChildOfClass("Humanoid") and hit.Parent:FindFirstChild("HitBy"..Player.Name) == nil then | |
1062 | local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid") | |
1063 | local dmg = math.random(min,max) | |
1064 | if humanoid.Health > 0 then | |
1065 | if beserk == true then | |
1066 | humanoid.Health = 0 | |
1067 | else | |
1068 | CreateSound("260430060", hit, 1.2, MRANDOM(7, 12) / 10) | |
1069 | hit.Velocity = CFrame.new(Torso.Position,hit.Position).lookVector*5*maxstrength | |
1070 | if math.random(1,100) < critrate+1 then | |
1071 | humanoid.Health = humanoid.Health - dmg*critmultiplier | |
1072 | StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), "CRIT/"..dmg*critmultiplier, C3(255/255, 0, 0)) | |
1073 | else | |
1074 | humanoid.Health = humanoid.Health - dmg | |
1075 | StatLabel("Normal", hit.CFrame * CF(0, 0 + (hit.Size.z - 1), 0), dmg, C3(255/255, 0, 0)) | |
1076 | end | |
1077 | local defence = Instance.new("BoolValue",hit.Parent) | |
1078 | defence.Name = ("HitBy"..Player.Name) | |
1079 | game:GetService("Debris"):AddItem(defence, 0.5) | |
1080 | end | |
1081 | end | |
1082 | end | |
1083 | end | |
1084 | ||
1085 | function killnearest(position,range,maxstrength) | |
1086 | for i,v in ipairs(workspace:GetChildren()) do | |
1087 | local body = v:GetChildren() | |
1088 | for part = 1, #body do | |
1089 | if((body[part].ClassName == "Part" or body[part].ClassName == "MeshPart") and v ~= Character) then | |
1090 | if(body[part].Position - position).Magnitude < range then | |
1091 | if v.ClassName == "Model" then | |
1092 | v:BreakJoints() | |
1093 | end | |
1094 | --table.insert(Effects2,{body[part],"Disappear",0.02,2,2,2,2}) | |
1095 | body[part].Velocity = CFrame.new(position,body[part].Position).lookVector*5*maxstrength | |
1096 | end | |
1097 | end | |
1098 | end | |
1099 | if v.ClassName == "Part" then | |
1100 | if v.Anchored == false and (v.Position - position).Magnitude < range then | |
1101 | --table.insert(Effects2,{v,"Disappear",0.02,2,2,2,2}) | |
1102 | v.Velocity = CFrame.new(position,v.Position).lookVector*5*maxstrength | |
1103 | end | |
1104 | end | |
1105 | end | |
1106 | end | |
1107 | ||
1108 | --//=================================\\ | |
1109 | --|| ATTACK FUNCTIONS AND STUFF | |
1110 | --\\=================================// | |
1111 | ||
1112 | function choosetarget() | |
1113 | if Mouse.Target.Parent ~= Character and Mouse.Target.Parent.Parent ~= Character and Mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil then | |
1114 | target = Mouse.Target.Parent | |
1115 | if boop ~= nil then | |
1116 | boop:remove() | |
1117 | end | |
1118 | local targettorso = target:FindFirstChild("Torso") or target:FindFirstChild("UpperTorso") | |
1119 | if targettorso ~= nil then | |
1120 | boop = IT("Part",Effects) | |
1121 | boop.Size = VT(0,0,0) | |
1122 | boop.CanCollide = false | |
1123 | boop.Transparency = 1 | |
1124 | boop.CFrame = targettorso.CFrame * CF(0,-0.75,0.8) | |
1125 | weldBetween(targettorso,boop) | |
1126 | local gui = abss:Clone() | |
1127 | gui.Parent = boop | |
1128 | gui.AlwaysOnTop = false | |
1129 | gui.Enabled = true | |
1130 | else | |
1131 | target = nil | |
1132 | end | |
1133 | end | |
1134 | end | |
1135 | ||
1136 | function assgrab() | |
1137 | if target ~= nil then | |
1138 | local targettorso = target:FindFirstChild("Torso") or target:FindFirstChild("UpperTorso") | |
1139 | if targettorso ~= nil then | |
1140 | ATTACK = true | |
1141 | targettorso.Anchored = true | |
1142 | Rooted = true | |
1143 | CreateSound("889222890", Head, 10, 1) | |
1144 | RootPart.CFrame = targettorso.CFrame * CF(0,0,3) | |
1145 | Swait(100) | |
1146 | if target ~= nil and targettorso ~= nil then | |
1147 | for i = 1, 3 do | |
1148 | CreateSound("948494432", targettorso, 10, 1) | |
1149 | Swait(5) | |
1150 | end | |
1151 | if target ~= nil and targettorso ~= nil then | |
1152 | Swait(15) | |
1153 | RootPart.CFrame = targettorso.CFrame * CF(0,0,1.5) | |
1154 | Swait(20) | |
1155 | RootPart.CFrame = targettorso.CFrame * CF(0,0,3) | |
1156 | ATTACK = false | |
1157 | Rooted = false | |
1158 | targettorso.Anchored = false | |
1159 | local bomb = IT("Part",target) | |
1160 | bomb.Size = VT(0,0,0) | |
1161 | bomb.CFrame = boop.CFrame | |
1162 | bomb.CanCollide = false | |
1163 | local mesh = IT("SpecialMesh",bomb) | |
1164 | mesh.MeshType = "FileMesh" | |
1165 | mesh.MeshId = "rbxasset://fonts/timebomb.mesh" | |
1166 | mesh.TextureId = "rbxasset://textures/bombtex.png" | |
1167 | weldBetween(targettorso,bomb) | |
1168 | CreateSound("138931042", targettorso, 10, 4) | |
1169 | Swait(150) | |
1170 | target:BreakJoints() | |
1171 | local boom = Instance.new("Explosion",workspace) | |
1172 | boom.Position = targettorso.Position | |
1173 | CreateSound("691216625", targettorso, 50, 1) | |
1174 | target = nil | |
1175 | else | |
1176 | Rooted = false | |
1177 | ATTACK = false | |
1178 | end | |
1179 | else | |
1180 | Rooted = false | |
1181 | ATTACK = false | |
1182 | end | |
1183 | end | |
1184 | end | |
1185 | end | |
1186 | ||
1187 | function slash() | |
1188 | ATTACK = true | |
1189 | Rooted = true | |
1190 | for i=0, 0.5, 0.1 / Animation_Speed do | |
1191 | --Swait() | |
1192 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
1193 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1194 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1195 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1196 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1197 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1198 | --HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1199 | end | |
1200 | local bomb = IT("Part",Effects) | |
1201 | bomb.Size = VT(0,0,0) | |
1202 | bomb.CFrame = RightArm.CFrame * CF(1.6,-1.2,0) * ANGLES(RAD(-90),RAD(0),RAD(-90)) | |
1203 | bomb.CanCollide = false | |
1204 | bomb.Color = C3(123/255, 0, 123/255) | |
1205 | local mesh = IT("SpecialMesh",bomb) | |
1206 | mesh.MeshType = "FileMesh" | |
1207 | mesh.Scale = VT(2,2,2) | |
1208 | mesh.MeshId = "http://www.roblox.com/asset?id=156092238" | |
1209 | weldBetween(RightArm,bomb) | |
1210 | Swait(10) | |
1211 | CreateSound("615910787", Torso, 5, MRANDOM(7, 12) / 10) | |
1212 | Swait(5) | |
1213 | for i = 1, 15 do | |
1214 | killnearest(bomb.Position,6,150) | |
1215 | RootPart.CFrame = RootPart.CFrame * CF(0,0,-3) | |
1216 | end | |
1217 | killnearest(bomb.Position,6,150) | |
1218 | for i=0, 1, 0.1 / Animation_Speed do | |
1219 | --Swait() | |
1220 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, -0.2 * Player_Size) * ANGLES(RAD(10), RAD(0), RAD(25)), 0.4 / Animation_Speed) | |
1221 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(-25)), 0.2 / Animation_Speed) | |
1222 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(0.25 * Player_Size, 0.5 * Player_Size, -0.5 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-70)) * ANGLES(RAD(20), RAD(90), RAD(0)) * RIGHTSHOULDERC0, 0.4 / Animation_Speed) | |
1223 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-25), RAD(0), RAD(-45)) * LEFTSHOULDERC0, 0.4 / Animation_Speed) | |
1224 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.3 * Player_Size, -1 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1225 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1226 | --HandleWeld.C0 = Clerp(HandleWeld.C0, CF(0 * Player_Size, -1.1 * Player_Size, 0 * Player_Size) * ANGLES(RAD(-5), RAD(0), RAD(0)), 0.4 / Animation_Speed) | |
1227 | end | |
1228 | Swait(25) | |
1229 | bomb:remove() | |
1230 | ATTACK = false | |
1231 | Rooted = false | |
1232 | end | |
1233 | ||
1234 | function hurr() | |
1235 | if target ~= nil then | |
1236 | local targettorso = target:FindFirstChild("Torso") or target:FindFirstChild("UpperTorso") | |
1237 | if targettorso ~= nil then | |
1238 | Rooted = true | |
1239 | ATTACK = true | |
1240 | RootPart.CFrame = targettorso.CFrame * CF(0,0,3) | |
1241 | for i = 1, 15 do | |
1242 | Swait(3) | |
1243 | RootPart.CFrame = targettorso.CFrame * CF(0,0,1) | |
1244 | Swait(3) | |
1245 | RootPart.CFrame = targettorso.CFrame * CF(0,0,3) | |
1246 | end | |
1247 | CreateSound("173137001", Head, 5, 1) | |
1248 | target:BreakJoints() | |
1249 | target = nil | |
1250 | Rooted = false | |
1251 | ATTACK = false | |
1252 | end | |
1253 | end | |
1254 | end | |
1255 | ||
1256 | function beam(from,size) | |
1257 | local sphere = Instance.new("Part",Effects) | |
1258 | sphere.Size = VT(size*2,size*2,size*2) | |
1259 | sphere.Material = "Neon" | |
1260 | sphere.Shape = "Ball" | |
1261 | sphere.Name = "Waft" | |
1262 | sphere.Anchored = true | |
1263 | sphere.Color = C3(80/255, 109/255, 84/255) | |
1264 | sphere.CFrame = RootPart.CFrame * CF(0,0.5,-from) | |
1265 | sphere.CanCollide = false | |
1266 | local hit = sphere.Touched:connect(function(hit) | |
1267 | dealdamage(hit,0,0,0,true,0,0) | |
1268 | end) | |
1269 | --table.insert(Effects2,{Lazor,"Disappear",0.01,0.03,0,0.03,1}) | |
1270 | table.insert(Effects2,{sphere,"Disappear",0.01,0.03,0,0.03,1}) | |
1271 | end | |
1272 | ||
1273 | function turnto(position) | |
1274 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
1275 | end | |
1276 | ||
1277 | function FARTLAZOR() | |
1278 | Rooted = true | |
1279 | ATTACK = true | |
1280 | for i=0, 2, 0.1 / Animation_Speed do | |
1281 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size + 0) * ANGLES(RAD(0), RAD(0), RAD(180)), 0.15 / Animation_Speed) | |
1282 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1283 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1284 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1285 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1286 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1287 | end | |
1288 | for i = 1, 25 do | |
1289 | Swait() | |
1290 | turnto(Mouse.Hit.p) | |
1291 | end | |
1292 | CreateSound("131314452", Effects, 10, 1) | |
1293 | beam(50,50) | |
1294 | Swait(50) | |
1295 | ATTACK = false | |
1296 | Rooted = false | |
1297 | end | |
1298 | ||
1299 | --//=================================\\ | |
1300 | --|| ASSIGN THINGS TO KEYS | |
1301 | --\\=================================// | |
1302 | ||
1303 | Humanoid.Changed:connect(function(Jump) | |
1304 | if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then | |
1305 | Humanoid.Jump = false | |
1306 | end | |
1307 | end) | |
1308 | ||
1309 | function MouseDown(Mouse) | |
1310 | if ATTACK == false then | |
1311 | choosetarget() | |
1312 | end | |
1313 | end | |
1314 | ||
1315 | function MouseUp(Mouse) | |
1316 | HOLD = false | |
1317 | end | |
1318 | ||
1319 | function KeyDown(Key) | |
1320 | if Key == "e" and ATTACK == false then | |
1321 | assgrab() | |
1322 | end | |
1323 | if Key == "g" and ATTACK == false then | |
1324 | slash() | |
1325 | end | |
1326 | if Key == "x" and ATTACK == false then | |
1327 | FARTLAZOR() | |
1328 | end | |
1329 | if Key == "f" and ATTACK == false then | |
1330 | hurr() | |
1331 | end | |
1332 | end | |
1333 | ||
1334 | function KeyUp(Key) | |
1335 | end | |
1336 | ||
1337 | Mouse.Button1Down:connect(function(NEWKEY) | |
1338 | MouseDown(NEWKEY) | |
1339 | end) | |
1340 | Mouse.Button1Up:connect(function(NEWKEY) | |
1341 | MouseUp(NEWKEY) | |
1342 | end) | |
1343 | Mouse.KeyDown:connect(function(NEWKEY) | |
1344 | KeyDown(NEWKEY) | |
1345 | end) | |
1346 | Mouse.KeyUp:connect(function(NEWKEY) | |
1347 | KeyUp(NEWKEY) | |
1348 | end) | |
1349 | ||
1350 | --//=================================\\ | |
1351 | --\\=================================// | |
1352 | ||
1353 | ||
1354 | function unanchor() | |
1355 | if UNANCHOR == true then | |
1356 | g = Character:GetChildren() | |
1357 | for i = 1, #g do | |
1358 | if g[i].ClassName == "Part" then | |
1359 | g[i].Anchored = false | |
1360 | end | |
1361 | end | |
1362 | end | |
1363 | end | |
1364 | ||
1365 | ||
1366 | --//=================================\\ | |
1367 | --|| WRAP THE WHOLE SCRIPT UP | |
1368 | --\\=================================// | |
1369 | ||
1370 | Humanoid.Changed:connect(function(Jump) | |
1371 | if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then | |
1372 | Humanoid.Jump = false | |
1373 | end | |
1374 | end) | |
1375 | Rooted = true | |
1376 | ANIMATE.Parent = nil | |
1377 | local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION) | |
1378 | IDLEANIMATION:Play() | |
1379 | Swait() | |
1380 | Rooted = false | |
1381 | ||
1382 | local loop = 0 | |
1383 | ||
1384 | while true do | |
1385 | Swait() | |
1386 | SINE = SINE + CHANGE | |
1387 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
1388 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
1389 | local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position) | |
1390 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character) | |
1391 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
1392 | if ATTACK == false then | |
1393 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size + 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1394 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1395 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1396 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1397 | RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1398 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1399 | end | |
1400 | if #Effects2>0 then | |
1401 | for e=1,#Effects2 do | |
1402 | if Effects2[e]~=nil then | |
1403 | local Thing=Effects2[e] | |
1404 | if Thing~=nil then | |
1405 | local Part=Thing[1] | |
1406 | local Mode=Thing[2] | |
1407 | local Delay=Thing[3] | |
1408 | local IncX=Thing[4] | |
1409 | local IncY=Thing[5] | |
1410 | local IncZ=Thing[6] | |
1411 | local Part2=Thing[8] | |
1412 | if Thing[1].Transparency<=1 then | |
1413 | if Thing[2]=="Block1" then | |
1414 | Thing[1].CFrame=Part2.CFrame | |
1415 | Mesh=Thing[1].Mesh | |
1416 | Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6]) | |
1417 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1418 | elseif Thing[2]=="Cylinder" then | |
1419 | Mesh=Thing[1].Mesh | |
1420 | Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6]) | |
1421 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1422 | elseif Thing[2]=="Blood" then | |
1423 | Mesh=Thing[7] | |
1424 | Thing[1].CFrame=Thing[1].CFrame*CF(0,.5,0) | |
1425 | Mesh.Scale=Mesh.Scale+VT(Thing[4],Thing[5],Thing[6]) | |
1426 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1427 | elseif Thing[2]=="Elec" then | |
1428 | Mesh=Thing[1].Mesh | |
1429 | Mesh.Scale=Mesh.Scale+VT(Thing[7],Thing[8],Thing[9]) | |
1430 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1431 | elseif Thing[2]=="Disappear" then | |
1432 | Thing[1].Transparency=Thing[1].Transparency+Thing[3] | |
1433 | end | |
1434 | else | |
1435 | Part.Parent=nil | |
1436 | table.remove(Effects2,e) | |
1437 | end | |
1438 | end | |
1439 | end | |
1440 | end | |
1441 | end | |
1442 | unanchor() | |
1443 | Humanoid.MaxHealth = "inf" | |
1444 | Humanoid.Health = "inf" | |
1445 | if Rooted == false then | |
1446 | Disable_Jump = false | |
1447 | Humanoid.WalkSpeed = Speed | |
1448 | elseif Rooted == true then | |
1449 | Disable_Jump = true | |
1450 | Humanoid.WalkSpeed = 0 | |
1451 | end | |
1452 | if target ~= nil then | |
1453 | loop = loop + 1 | |
1454 | if loop == 35 then | |
1455 | if target:FindFirstChild("HumanoidRootPart") then | |
1456 | CreateSound("161164363", target.HumanoidRootPart, 10, 1.1) | |
1457 | end | |
1458 | loop = 0 | |
1459 | end | |
1460 | end | |
1461 | end | |
1462 | ||
1463 | --//=================================\\ | |
1464 | --\\=================================// | |
1465 | ||
1466 | ||
1467 | ||
1468 | ||
1469 | ||
1470 | --//====================================================\\-- | |
1471 | --|| END OF SCRIPT | |
1472 | --\\====================================================//-- |