SHOW:
|
|
- or go back to the newest paste.
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 | |
6 | ||
7 | wait(1) | |
8 | ||
9 | plr = game.Players.LocalPlayer | |
10 | char = plr.Character | |
11 | hum = char.Humanoid | |
12 | local cam = game.Workspace.CurrentCamera | |
13 | t = char.Torso | |
14 | h = char.Head | |
15 | ra = char["Right Arm"] | |
16 | la = char["Left Arm"] | |
17 | rl = char["Right Leg"] | |
18 | ll = char["Left Leg"] | |
19 | tors = char.Torso | |
20 | lleg = char["Left Leg"] | |
21 | root = char.HumanoidRootPart | |
22 | hed = char.Head | |
23 | rleg = char["Right Leg"] | |
24 | rarm = char["Right Arm"] | |
25 | larm = char["Left Arm"] | |
26 | vt = Vector3.new | |
27 | bc = BrickColor.new | |
28 | br = BrickColor.random | |
29 | it = Instance.new | |
30 | cf = CFrame.new | |
31 | ||
32 | ||
33 | function CameraShake(Times, Power) | |
34 | coroutine.resume(coroutine.create(function() | |
35 | FV = Instance.new("BoolValue", Character) | |
36 | FV.Name = "CameraShake" | |
37 | for ShakeNum=1,Times do | |
38 | swait() | |
39 | local ef=Power | |
40 | if ef>=1 then | |
41 | Humanoid.CameraOffset = Vector3.new(math.random(-ef,ef),math.random(-ef,ef),math.random(-ef,ef)) | |
42 | else | |
43 | ef=Power*10 | |
44 | Humanoid.CameraOffset = Vector3.new(math.random(-ef,ef)/10,math.random(-ef,ef)/10,math.random(-ef,ef)/10) | |
45 | end | |
46 | end | |
47 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
48 | FV:Destroy() | |
49 | end)) | |
50 | end | |
51 | ||
52 | CamShake=function(Part,Distan,Power,Times) | |
53 | local de=Part.Position | |
54 | for i,v in pairs(workspace:children()) do | |
55 | if v:IsA("Model") and v:findFirstChild("Humanoid") then | |
56 | for _,c in pairs(v:children()) do | |
57 | if c.ClassName=="Part" and (c.Position - de).magnitude < Distan then | |
58 | local Noob=v.Humanoid | |
59 | if Noob~=nil then | |
60 | if Noob:FindFirstChild("CamShake")==nil then-- and Noob == Character then | |
61 | --[[local ss=script.CamShake:clone() | |
62 | ss.Parent=Noob | |
63 | ss.Power.Value=Power | |
64 | ss.Times.Value=Times | |
65 | ss.Disabled=false]] | |
66 | CameraShake(Times, Power) | |
67 | end | |
68 | end | |
69 | end | |
70 | end | |
71 | end | |
72 | end | |
73 | end | |
74 | ||
75 | function chatfunc(text,color) | |
76 | local chat = coroutine.wrap(function() | |
77 | if Character:FindFirstChild("TalkingBillBoard")~= nil then | |
78 | Character:FindFirstChild("TalkingBillBoard"):destroy() | |
79 | end | |
80 | local naeeym2 = Instance.new("BillboardGui",Character) | |
81 | naeeym2.Size = UDim2.new(0,100,0,40) | |
82 | naeeym2.StudsOffset = Vector3.new(0,3,0) | |
83 | naeeym2.Adornee = Character.Head | |
84 | naeeym2.Name = "TalkingBillBoard" | |
85 | local tecks2 = Instance.new("TextLabel",naeeym2) | |
86 | tecks2.BackgroundTransparency = 1 | |
87 | tecks2.BorderSizePixel = 0 | |
88 | tecks2.Text = "" | |
89 | tecks2.Font = "SciFi" | |
90 | tecks2.TextSize = 30 | |
91 | tecks2.TextStrokeTransparency = 0 | |
92 | tecks2.TextColor3 = color | |
93 | tecks2.TextStrokeColor3 = Color3.new(0,0,0) | |
94 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
95 | local tecks3 = Instance.new("TextLabel",naeeym2) | |
96 | tecks3.BackgroundTransparency = 1 | |
97 | tecks3.BorderSizePixel = 0 | |
98 | tecks3.Text = "" | |
99 | tecks3.Font = "SciFi" | |
100 | tecks3.TextSize = 30 | |
101 | tecks3.TextStrokeTransparency = 0 | |
102 | tecks3.TextColor3 = Color3.new(0,0,0) | |
103 | tecks3.TextStrokeColor3 = color | |
104 | tecks3.Size = UDim2.new(1,0,0.5,0) | |
105 | for i = 1,string.len(text),1 do | |
106 | CFuncs["Sound"].Create("rbxassetid://274118116", char, 0.25, 0.115) | |
107 | tecks2.Text = string.sub(text,1,i) | |
108 | tecks3.Text = string.sub(text,1,i) | |
109 | wait(0.01) | |
110 | end | |
111 | wait(1) | |
112 | local randomrot = math.random(1,2) | |
113 | if randomrot == 1 then | |
114 | for i = 1, 50 do | |
115 | swait() | |
116 | tecks2.Rotation = tecks2.Rotation - .75 | |
117 | tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04 | |
118 | tecks2.TextTransparency = tecks2.TextTransparency + .04 | |
119 | tecks3.Rotation = tecks2.Rotation + .75 | |
120 | tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04 | |
121 | tecks3.TextTransparency = tecks2.TextTransparency + .04 | |
122 | end | |
123 | elseif randomrot == 2 then | |
124 | for i = 1, 50 do | |
125 | swait() | |
126 | tecks2.Rotation = tecks2.Rotation + .75 | |
127 | tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04 | |
128 | tecks2.TextTransparency = tecks2.TextTransparency + .04 | |
129 | tecks3.Rotation = tecks2.Rotation - .75 | |
130 | tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04 | |
131 | tecks3.TextTransparency = tecks2.TextTransparency + .04 | |
132 | end | |
133 | end | |
134 | naeeym2:Destroy() | |
135 | end) | |
136 | chat() | |
137 | end | |
138 | ||
139 | ||
140 | local Create = LoadLibrary("RbxUtility").Create | |
141 | ||
142 | CFuncs = { | |
143 | ["Part"] = { | |
144 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
145 | local Part = Create("Part"){ | |
146 | Parent = Parent, | |
147 | Reflectance = Reflectance, | |
148 | Transparency = Transparency, | |
149 | CanCollide = false, | |
150 | Locked = true, | |
151 | BrickColor = BrickColor.new(tostring(BColor)), | |
152 | Name = Name, | |
153 | Size = Size, | |
154 | Material = Material, | |
155 | } | |
156 | RemoveOutlines(Part) | |
157 | return Part | |
158 | end; | |
159 | }; | |
160 | ||
161 | ["Mesh"] = { | |
162 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
163 | local Msh = Create(Mesh){ | |
164 | Parent = Part, | |
165 | Offset = OffSet, | |
166 | Scale = Scale, | |
167 | } | |
168 | if Mesh == "SpecialMesh" then | |
169 | Msh.MeshType = MeshType | |
170 | Msh.MeshId = MeshId | |
171 | end | |
172 | return Msh | |
173 | end; | |
174 | }; | |
175 | ||
176 | ["Mesh"] = { | |
177 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
178 | local Msh = Create(Mesh){ | |
179 | Parent = Part, | |
180 | Offset = OffSet, | |
181 | Scale = Scale, | |
182 | } | |
183 | if Mesh == "SpecialMesh" then | |
184 | Msh.MeshType = MeshType | |
185 | Msh.MeshId = MeshId | |
186 | end | |
187 | return Msh | |
188 | end; | |
189 | }; | |
190 | ||
191 | ["Weld"] = { | |
192 | Create = function(Parent, Part0, Part1, C0, C1) | |
193 | local Weld = Create("Weld"){ | |
194 | Parent = Parent, | |
195 | Part0 = Part0, | |
196 | Part1 = Part1, | |
197 | C0 = C0, | |
198 | C1 = C1, | |
199 | } | |
200 | return Weld | |
201 | end; | |
202 | }; | |
203 | ||
204 | ["Sound"] = { | |
205 | Create = function(id, par, vol, pit) | |
206 | coroutine.resume(coroutine.create(function() | |
207 | local S = Create("Sound"){ | |
208 | Volume = vol, | |
209 | Pitch = pit or 1, | |
210 | SoundId = id, | |
211 | Parent = par or workspace, | |
212 | } | |
213 | wait() | |
214 | S:play() | |
215 | game:GetService("Debris"):AddItem(S, 10) | |
216 | end)) | |
217 | end; | |
218 | }; | |
219 | ||
220 | ["LongSound"] = { | |
221 | Create = function(id, par, vol, pit) | |
222 | coroutine.resume(coroutine.create(function() | |
223 | local S = Create("Sound"){ | |
224 | Volume = vol, | |
225 | Pitch = pit or 1, | |
226 | SoundId = id, | |
227 | Parent = par or workspace, | |
228 | } | |
229 | wait() | |
230 | S:play() | |
231 | game:GetService("Debris"):AddItem(S, 30) | |
232 | end)) | |
233 | end; | |
234 | }; | |
235 | ||
236 | ["ParticleEmitter"] = { | |
237 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
238 | local fp = Create("ParticleEmitter"){ | |
239 | Parent = Parent, | |
240 | Color = ColorSequence.new(Color1, Color2), | |
241 | LightEmission = LightEmission, | |
242 | Size = Size, | |
243 | Texture = Texture, | |
244 | Transparency = Transparency, | |
245 | ZOffset = ZOffset, | |
246 | Acceleration = Accel, | |
247 | Drag = Drag, | |
248 | LockedToPart = LockedToPart, | |
249 | VelocityInheritance = VelocityInheritance, | |
250 | EmissionDirection = EmissionDirection, | |
251 | Enabled = Enabled, | |
252 | Lifetime = LifeTime, | |
253 | Rate = Rate, | |
254 | Rotation = Rotation, | |
255 | RotSpeed = RotSpeed, | |
256 | Speed = Speed, | |
257 | VelocitySpread = VelocitySpread, | |
258 | } | |
259 | return fp | |
260 | end; | |
261 | }; | |
262 | ||
263 | CreateTemplate = { | |
264 | ||
265 | }; | |
266 | } | |
267 | ||
268 | ||
269 | ||
270 | New = function(Object, Parent, Name, Data) | |
271 | local Object = Instance.new(Object) | |
272 | for Index, Value in pairs(Data or {}) do | |
273 | Object[Index] = Value | |
274 | end | |
275 | Object.Parent = Parent | |
276 | Object.Name = Name | |
277 | return Object | |
278 | end | |
279 | ||
280 | local glowcolor = BrickColor.new("Toothpaste") | |
281 | local glowcolor2 = BrickColor.new("Institutional white") | |
282 | local patchcolor = BrickColor.new("Really black") | |
283 | local patchcolor2 = BrickColor.new("Really black") | |
284 | local wepcolor = BrickColor.new("Smoky grey") | |
285 | local m = Instance.new("Model",char) | |
286 | ||
287 | function CreateParta(parent,transparency,reflectance,material,brickcolor) | |
288 | local p = Instance.new("Part") | |
289 | p.TopSurface = 0 | |
290 | p.BottomSurface = 0 | |
291 | p.Parent = parent | |
292 | p.Size = Vector3.new(0.05,0.05,0.05) | |
293 | p.Transparency = transparency | |
294 | p.Reflectance = reflectance | |
295 | p.CanCollide = false | |
296 | p.Locked = true | |
297 | p.BrickColor = brickcolor | |
298 | p.Material = material | |
299 | return p | |
300 | end | |
301 | ||
302 | function CreateMesh(parent,meshtype,x1,y1,z1) | |
303 | local mesh = Instance.new("SpecialMesh",parent) | |
304 | mesh.MeshType = meshtype | |
305 | mesh.Scale = Vector3.new(x1*20,y1*20,z1*20) | |
306 | return mesh | |
307 | end | |
308 | ||
309 | function CreateSpecialMesh(parent,meshid,x1,y1,z1) | |
310 | local mesh = Instance.new("SpecialMesh",parent) | |
311 | mesh.MeshType = "FileMesh" | |
312 | mesh.MeshId = meshid | |
313 | mesh.Scale = Vector3.new(x1,y1,z1) | |
314 | return mesh | |
315 | end | |
316 | ||
317 | ||
318 | function CreateSpecialGlowMesh(parent,meshid,x1,y1,z1) | |
319 | local mesh = Instance.new("SpecialMesh",parent) | |
320 | mesh.MeshType = "FileMesh" | |
321 | mesh.MeshId = meshid | |
322 | mesh.TextureId = "http://www.roblox.com/asset/?id=269748808" | |
323 | mesh.Scale = Vector3.new(x1,y1,z1) | |
324 | mesh.VertexColor = Vector3.new(parent.BrickColor.r, parent.BrickColor.g, parent.BrickColor.b) | |
325 | return mesh | |
326 | end | |
327 | ||
328 | function CreateWeld(parent,part0,part1,C1X,C1Y,C1Z,C1Xa,C1Ya,C1Za,C0X,C0Y,C0Z,C0Xa,C0Ya,C0Za) | |
329 | local weld = Instance.new("Weld") | |
330 | weld.Parent = parent | |
331 | weld.Part0 = part0 | |
332 | weld.Part1 = part1 | |
333 | weld.C1 = CFrame.new(C1X,C1Y,C1Z)*CFrame.Angles(C1Xa,C1Ya,C1Za) | |
334 | weld.C0 = CFrame.new(C0X,C0Y,C0Z)*CFrame.Angles(C0Xa,C0Ya,C0Za) | |
335 | return weld | |
336 | end | |
337 | ||
338 | ||
339 | local sorb = CreateParta(m,1,1,"SmoothPlastic",BrickColor.random()) | |
340 | CreateWeld(sorb,rarm,sorb,0,1.15,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
341 | ||
342 | local wepcenter = CreateParta(m,1,0,"SmoothPlastic",wepcolor) | |
343 | local wepweld = CreateWeld(wepcenter,tors,wepcenter,1,0,-4,math.rad(20),math.rad(-90),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
344 | ||
345 | ||
346 | ga = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
347 | CreateMesh(ga,"Brick",0.175,0.175,2.25) | |
348 | CreateWeld(ga,wepcenter,ga,0,0,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
349 | ga = CreateParta(m,0,0,"Neon",glowcolor) | |
350 | CreateMesh(ga,"Brick",0.195,0.195,1.45) | |
351 | CreateWeld(ga,wepcenter,ga,0,0,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
352 | ga = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
353 | CreateMesh(ga,"Brick",0.215,0.215,1.375) | |
354 | CreateWeld(ga,wepcenter,ga,0,0,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
355 | ga = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
356 | CreateMesh(ga,"Brick",0.125,0.125,1.25) | |
357 | CreateWeld(ga,wepcenter,ga,0,-0.5,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
358 | ||
359 | ga = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
360 | CreateMesh(ga,"Brick",0.125,0.125,0.65) | |
361 | CreateWeld(ga,wepcenter,ga,0,-0.765,0.35,math.rad(45),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
362 | ||
363 | ga = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
364 | CreateMesh(ga,"Brick",0.125,0.125,0.65) | |
365 | CreateWeld(ga,wepcenter,ga,0,-0.765,-0.35,math.rad(-45),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
366 | ||
367 | ga = CreateParta(m,0,0,"Neon",glowcolor) | |
368 | CreateMesh(ga,"Brick",0.245,0.245,1.45) | |
369 | CreateWeld(ga,wepcenter,ga,0,0,-2,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
370 | ga = CreateParta(m,0,0,"Neon",glowcolor) | |
371 | CreateMesh(ga,"Brick",0.265,0.265,0.45) | |
372 | CreateWeld(ga,wepcenter,ga,0,0,-2,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
373 | ga = CreateParta(m,0,0,"SmoothPlastic",patchcolor) | |
374 | CreateMesh(ga,"Brick",0.285,0.285,0.35) | |
375 | CreateWeld(ga,wepcenter,ga,0,0,-2,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
376 | ga = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
377 | CreateMesh(ga,"Brick",0.2525,0.2525,1.375) | |
378 | CreateWeld(ga,wepcenter,ga,0,0,-2,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
379 | cryst = CreateParta(m,0,0,"SmoothPlastic",patchcolor2) | |
380 | CreateSpecialMesh(cryst,"http://www.roblox.com/Asset/?id=9756362",0.55,0.55,1.5) | |
381 | CreateWeld(cryst,wepcenter,cryst,0,0,-1,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
382 | cryst = CreateParta(m,0,0,"SmoothPlastic",glowcolor2) | |
383 | CreateSpecialMesh(cryst,"http://www.roblox.com/Asset/?id=9756362",0.575,0.575,1) | |
384 | CreateWeld(cryst,wepcenter,cryst,0,0,-1,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
385 | cryst = CreateParta(m,0,0,"SmoothPlastic",glowcolor) | |
386 | CreateSpecialMesh(cryst,"http://www.roblox.com/Asset/?id=9756362",0.45,0.45,0.5) | |
387 | CreateWeld(cryst,wepcenter,cryst,0,0,-1.25,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
388 | cryst = CreateParta(m,0,0,"SmoothPlastic",glowcolor) | |
389 | CreateSpecialMesh(cryst,"http://www.roblox.com/Asset/?id=9756362",0.45,0.45,0.5) | |
390 | CreateWeld(cryst,wepcenter,cryst,0,0,-0.75,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
391 | cryst = CreateParta(m,0,0,"SmoothPlastic",patchcolor2) | |
392 | CreateSpecialMesh(cryst,"http://www.roblox.com/Asset/?id=9756362",0.5,0.5,2) | |
393 | CreateWeld(cryst,wepcenter,cryst,0,0,-2.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
394 | cryst = CreateParta(m,0,0,"SmoothPlastic",patchcolor2) | |
395 | CreateSpecialMesh(cryst,"http://www.roblox.com/Asset/?id=9756362",1,1,0.5) | |
396 | CreateWeld(cryst,wepcenter,cryst,0,0,1,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
397 | crysta = CreateParta(m,0,0,"SmoothPlastic",patchcolor) | |
398 | CreateSpecialMesh(crysta,"http://www.roblox.com/Asset/?id=9756362",1,1,0.35) | |
399 | CreateWeld(crysta,cryst,crysta,0,0,0,math.rad(0),math.rad(0),math.rad(45),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
400 | ||
401 | orbe = CreateParta(m,0,0,"Neon",glowcolor) | |
402 | CreateMesh(orbe,"Sphere",0.35,0.35,0.25) | |
403 | CreateWeld(orbe,wepcenter,orbe,0,0,1.25,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
404 | ||
405 | ||
406 | orbem = CreateParta(m,0.75,0,"Neon",glowcolor) | |
407 | CreateMesh(orbem,"Cylinder",2,0.45,0.45) | |
408 | CreateWeld(orbem,orbe,orbem,0.75,0,0,math.rad(0),math.rad(90),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
409 | ||
410 | orba = CreateParta(m,0,0,"Neon",glowcolor2) | |
411 | CreateMesh(orba,"Sphere",0.65,0.65,0.65) | |
412 | CreateWeld(orba,wepcenter,orba,0,0,2,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
413 | ||
414 | ||
415 | ger = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
416 | CreateSpecialMesh(ger,"http://www.roblox.com/asset?id=156292343",1.5,1.5,1.5) | |
417 | local orbitalweld = CreateWeld(ger,orba,ger,0,0,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
418 | ||
419 | boi = CreateParta(m,0,0,"SmoothPlastic",patchcolor) | |
420 | CreateSpecialMesh(boi,"http://www.roblox.com/asset?id=156292343",2,2,7.5) | |
421 | CreateWeld(boi,cryst,boi,0,0,2,math.rad(0),math.rad(0),math.rad(45),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
422 | boi = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
423 | CreateSpecialMesh(boi,"http://www.roblox.com/asset?id=156292343",3,3,2.5) | |
424 | CreateWeld(boi,cryst,boi,0,0,2,math.rad(0),math.rad(0),math.rad(45),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
425 | crysta = CreateParta(m,0,0,"SmoothPlastic",glowcolor) | |
426 | CreateSpecialMesh(crysta,"http://www.roblox.com/Asset/?id=9756362",1,1,0.65) | |
427 | CreateWeld(crysta,cryst,crysta,0,0,2,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
428 | ||
429 | blad = CreateParta(m,0,0,"SmoothPlastic",patchcolor2) | |
430 | CreateMesh(blad,"Brick",0.15,1.5,6.75) | |
431 | CreateWeld(blad,wepcenter,blad,0,0,6.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
432 | bladn = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
433 | CreateMesh(bladn,"Brick",0.1,1.65,6.75) | |
434 | CreateWeld(bladn,wepcenter,bladn,0,0,6.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
435 | ||
436 | local hitbox = CreateParta(m,1,0,"SmoothPlastic",BrickColor.random()) | |
437 | hitbox.Size = Vector3.new(0.5,0.5,10) | |
438 | CreateWeld(hitbox,blad,hitbox,0,0,-1,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
439 | ||
440 | ----------- | |
441 | ||
442 | boipatt = CreateParta(m,0,0,"SmoothPlastic",glowcolor) | |
443 | CreateSpecialMesh(boipatt,"http://www.roblox.com/asset?id=156292343",1,1,5) | |
444 | CreateWeld(boipatt,wepcenter,boipatt,4,-0.25,0,math.rad(0),math.rad(90),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
445 | orbpatt = CreateParta(m,0,0,"Neon",glowcolor2) | |
446 | CreateMesh(orbpatt,"Sphere",0.8,0.8,0.225) | |
447 | CreateWeld(orbpatt,boipatt,orbpatt,0,0,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
448 | ||
449 | boipatt = CreateParta(m,0,0,"SmoothPlastic",glowcolor) | |
450 | CreateSpecialMesh(boipatt,"http://www.roblox.com/asset?id=156292343",0.8,0.8,5) | |
451 | CreateWeld(boipatt,wepcenter,boipatt,6,-0.25,0,math.rad(0),math.rad(90),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
452 | orbpatt = CreateParta(m,0,0,"Neon",glowcolor2) | |
453 | CreateMesh(orbpatt,"Sphere",0.6,0.6,0.225) | |
454 | CreateWeld(orbpatt,boipatt,orbpatt,0,0,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
455 | ||
456 | boipatt = CreateParta(m,0,0,"SmoothPlastic",glowcolor) | |
457 | CreateSpecialMesh(boipatt,"http://www.roblox.com/asset?id=156292343",0.6,0.6,5) | |
458 | CreateWeld(boipatt,wepcenter,boipatt,8,-0.25,0,math.rad(0),math.rad(90),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
459 | orbpatt = CreateParta(m,0,0,"Neon",glowcolor2) | |
460 | CreateMesh(orbpatt,"Sphere",0.4,0.4,0.225) | |
461 | CreateWeld(orbpatt,boipatt,orbpatt,0,0,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
462 | ||
463 | boipatt = CreateParta(m,0,0,"SmoothPlastic",glowcolor) | |
464 | CreateSpecialMesh(boipatt,"http://www.roblox.com/asset?id=156292343",0.4,0.4,5) | |
465 | CreateWeld(boipatt,wepcenter,boipatt,10,-0.25,0,math.rad(0),math.rad(90),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
466 | orbpatt = CreateParta(m,0,0,"Neon",glowcolor2) | |
467 | CreateMesh(orbpatt,"Sphere",0.25,0.25,0.225) | |
468 | CreateWeld(orbpatt,boipatt,orbpatt,0,0,0,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
469 | ||
470 | patt = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
471 | CreateMesh(patt,"Brick",0.175,0.25,6.75) | |
472 | CreateWeld(patt,wepcenter,patt,0,0.45,6.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
473 | pattw = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
474 | CreateMesh(pattw,"Wedge",0.175,0.25,0.25) | |
475 | CreateWeld(pattw,wepcenter,pattw,0,-0.45,10,math.rad(0),math.rad(0),math.rad(180),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
476 | ||
477 | patte = CreateParta(m,0,0,"Neon",glowcolor) | |
478 | CreateMesh(patte,"Brick",0.185,0.175,1) | |
479 | CreateWeld(patte,wepcenter,patte,0,0.45,3.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
480 | ||
481 | patte = CreateParta(m,0,0,"Neon",glowcolor) | |
482 | CreateMesh(patte,"Brick",0.185,0.175,1) | |
483 | CreateWeld(patte,wepcenter,patte,0,0.45,4.75,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
484 | ||
485 | patte = CreateParta(m,0,0,"Neon",glowcolor) | |
486 | CreateMesh(patte,"Brick",0.185,0.175,1) | |
487 | CreateWeld(patte,wepcenter,patte,0,0.45,6,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
488 | ||
489 | patte = CreateParta(m,0,0,"Neon",glowcolor) | |
490 | CreateMesh(patte,"Brick",0.185,0.175,1) | |
491 | CreateWeld(patte,wepcenter,patte,0,0.45,7.25,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
492 | ||
493 | patte = CreateParta(m,0,0,"Neon",glowcolor) | |
494 | CreateMesh(patte,"Brick",0.185,0.175,1) | |
495 | CreateWeld(patte,wepcenter,patte,0,0.45,8.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
496 | ||
497 | patte = CreateParta(m,0,0,"Neon",glowcolor) | |
498 | CreateMesh(patte,"Brick",0.185,0.175,0.65) | |
499 | CreateWeld(patte,wepcenter,patte,0,0.45,9.55,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
500 | pattew = CreateParta(m,0,0,"Neon",glowcolor) | |
501 | CreateMesh(pattew,"Wedge",0.185,0.175,0.15) | |
502 | CreateWeld(pattew,wepcenter,pattew,0,-0.45,9.95,math.rad(0),math.rad(0),math.rad(180),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
503 | ||
504 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
505 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
506 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
507 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
508 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
509 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,5.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
510 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
511 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
512 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,4.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
513 | ||
514 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
515 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
516 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,7,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
517 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
518 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
519 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,7.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
520 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
521 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
522 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,6.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
523 | ||
524 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
525 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
526 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,9,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
527 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
528 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
529 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,9.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
530 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
531 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
532 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,8.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
533 | ||
534 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
535 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
536 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,11,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
537 | orbpatet = CreateParta(m,0,0,"Neon",patchcolor) | |
538 | CreateMesh(orbpatet,"Sphere",0.175,0.175,0.225) | |
539 | CreateWeld(orbpatet,wepcenter,orbpatet,0,-0.45,10.5,math.rad(0),math.rad(0),math.rad(0),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
540 | ----------- | |
541 | ||
542 | bladt = CreateParta(m,0,0,"SmoothPlastic",patchcolor2) | |
543 | CreateMesh(bladt,"Wedge",0.15,1.5,2) | |
544 | CreateWeld(bladt,wepcenter,bladt,0,0,10.85,math.rad(0),math.rad(0),math.rad(180),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
545 | bladtn = CreateParta(m,0,0,"SmoothPlastic",wepcolor) | |
546 | CreateMesh(bladtn,"Wedge",0.1,1.65,2.2) | |
547 | CreateWeld(bladtn,wepcenter,bladtn,0,0,10.975,math.rad(0),math.rad(0),math.rad(180),0,0,0,math.rad(0),math.rad(0),math.rad(0)) | |
548 | ------ | |
549 | ||
550 | ||
551 | function RemoveOutlines(part) | |
552 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
553 | end | |
554 | function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
555 | local Part = Create("Part")({ | |
556 | Parent = Parent, | |
557 | Reflectance = Reflectance, | |
558 | Transparency = Transparency, | |
559 | CanCollide = false, | |
560 | Locked = true, | |
561 | BrickColor = BrickColor.new(tostring(BColor)), | |
562 | Name = Name, | |
563 | Size = Size, | |
564 | Material = Material | |
565 | }) | |
566 | Part.CustomPhysicalProperties = PhysicalProperties.new(0.001, 0.001, 0.001, 0.001, 0.001) | |
567 | RemoveOutlines(Part) | |
568 | return Part | |
569 | end | |
570 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
571 | local Msh = Create(Mesh)({ | |
572 | Parent = Part, | |
573 | Offset = OffSet, | |
574 | Scale = Scale | |
575 | }) | |
576 | if Mesh == "SpecialMesh" then | |
577 | Msh.MeshType = MeshType | |
578 | Msh.MeshId = MeshId | |
579 | end | |
580 | return Msh | |
581 | end | |
582 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
583 | local Weld = Create("Weld")({ | |
584 | Parent = Parent, | |
585 | Part0 = Part0, | |
586 | Part1 = Part1, | |
587 | C0 = C0, | |
588 | C1 = C1 | |
589 | }) | |
590 | return Weld | |
591 | end | |
592 | ||
593 | Player=game:GetService("Players").LocalPlayer | |
594 | Character=Player.Character | |
595 | PlayerGui=Player.PlayerGui | |
596 | Backpack=Player.Backpack | |
597 | Torso=Character.Torso | |
598 | Head=Character.Head | |
599 | Humanoid=Character.Humanoid | |
600 | m=Instance.new('Model',Character) | |
601 | LeftArm=Character["Left Arm"] | |
602 | LeftLeg=Character["Left Leg"] | |
603 | RightArm=Character["Right Arm"] | |
604 | RightLeg=Character["Right Leg"] | |
605 | LS=Torso["Left Shoulder"] | |
606 | LH=Torso["Left Hip"] | |
607 | RS=Torso["Right Shoulder"] | |
608 | RH=Torso["Right Hip"] | |
609 | Face = Head.face | |
610 | Neck=Torso.Neck | |
611 | it=Instance.new | |
612 | attacktype=1 | |
613 | vt=Vector3.new | |
614 | cf=CFrame.new | |
615 | euler=CFrame.fromEulerAnglesXYZ | |
616 | angles=CFrame.Angles | |
617 | cloaked=false | |
618 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
619 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
620 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
621 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
622 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
623 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
624 | RootPart=Character.HumanoidRootPart | |
625 | RootJoint=RootPart.RootJoint | |
626 | RootCF=euler(-1.57,0,3.14) | |
627 | attack = false | |
628 | attackdebounce = false | |
629 | deb=false | |
630 | equipped=true | |
631 | hand=false | |
632 | MMouse=nil | |
633 | combo=0 | |
634 | mana=0 | |
635 | trispeed=.2 | |
636 | attackmode='none' | |
637 | local idle=0 | |
638 | local Anim="Idle" | |
639 | local Effects={} | |
640 | local gun=false | |
641 | local shoot=false | |
642 | local sine = 0 | |
643 | local change = 1 | |
644 | player=nil | |
645 | ||
646 | mouse=Player:GetMouse() | |
647 | --save shoulders | |
648 | RSH, LSH=nil, nil | |
649 | --welds | |
650 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
651 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
652 | LH=Torso["Left Hip"] | |
653 | RH=Torso["Right Hip"] | |
654 | TorsoColor=Torso.BrickColor | |
655 | function NoOutline(Part) | |
656 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
657 | end | |
658 | player=Player | |
659 | ch=Character | |
660 | RSH=ch.Torso["Right Shoulder"] | |
661 | LSH=ch.Torso["Left Shoulder"] | |
662 | -- | |
663 | RSH.Parent=nil | |
664 | LSH.Parent=nil | |
665 | -- | |
666 | RW.Name="Right Shoulder" | |
667 | RW.Part0=ch.Torso | |
668 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
669 | RW.C1=cf(0, 0.5, 0) | |
670 | RW.Part1=ch["Right Arm"] | |
671 | RW.Parent=ch.Torso | |
672 | -- | |
673 | LW.Name="Left Shoulder" | |
674 | LW.Part0=ch.Torso | |
675 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
676 | LW.C1=cf(0, 0.5, 0) | |
677 | LW.Part1=ch["Left Arm"] | |
678 | LW.Parent=ch.Torso | |
679 | ||
680 | local Stats=Instance.new("BoolValue") | |
681 | Stats.Name="Stats" | |
682 | Stats.Parent=Character | |
683 | local Atk=Instance.new("NumberValue") | |
684 | Atk.Name="Damage" | |
685 | Atk.Parent=Stats | |
686 | Atk.Value=1 | |
687 | local Def=Instance.new("NumberValue") | |
688 | Def.Name="Defense" | |
689 | Def.Parent=Stats | |
690 | Def.Value=1 | |
691 | local Speed=Instance.new("NumberValue") | |
692 | Speed.Name="Speed" | |
693 | Speed.Parent=Stats | |
694 | Speed.Value=1 | |
695 | local Mvmt=Instance.new("NumberValue") | |
696 | Mvmt.Name="Movement" | |
697 | Mvmt.Parent=Stats | |
698 | Mvmt.Value=1 | |
699 | ||
700 | local donum=0 | |
701 | ||
702 | ||
703 | function part(formfactor,parent,reflectance,transparency,brickcolor,name,size) | |
704 | local fp=it("Part") | |
705 | fp.formFactor=formfactor | |
706 | fp.Parent=parent | |
707 | fp.Reflectance=reflectance | |
708 | fp.Transparency=transparency | |
709 | fp.CanCollide=false | |
710 | fp.Locked=true | |
711 | fp.BrickColor=brickcolor | |
712 | fp.Name=name | |
713 | fp.Size=size | |
714 | fp.Position=Torso.Position | |
715 | NoOutline(fp) | |
716 | fp.Material="SmoothPlastic" | |
717 | fp:BreakJoints() | |
718 | return fp | |
719 | end | |
720 | ||
721 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
722 | local mesh=it(Mesh) | |
723 | mesh.Parent=part | |
724 | if Mesh=="SpecialMesh" then | |
725 | mesh.MeshType=meshtype | |
726 | if meshid~="nil" then | |
727 | mesh.MeshId="http://www.roblox.com/asset/?id="..meshid | |
728 | end | |
729 | end | |
730 | mesh.Offset=offset | |
731 | mesh.Scale=scale | |
732 | return mesh | |
733 | end | |
734 | ||
735 | function weld(parent,part0,part1,c0) | |
736 | local weld=it("Weld") | |
737 | weld.Parent=parent | |
738 | weld.Part0=part0 | |
739 | weld.Part1=part1 | |
740 | weld.C0=c0 | |
741 | return weld | |
742 | end | |
743 | ||
744 | local Color1=Torso.BrickColor | |
745 | ||
746 | local bodvel=Instance.new("BodyVelocity") | |
747 | local bg=Instance.new("BodyGyro") | |
748 | ||
749 | function swait(num) | |
750 | if num==0 or num==nil then | |
751 | game:service'RunService'.Stepped:wait(0) | |
752 | else | |
753 | for i=0,num do | |
754 | game:service'RunService'.Stepped:wait(0) | |
755 | end | |
756 | end | |
757 | end | |
758 | ||
759 | ||
760 | so = function(id,par,vol,pit) | |
761 | coroutine.resume(coroutine.create(function() | |
762 | local sou = Instance.new("Sound",par or workspace) | |
763 | sou.Volume=vol | |
764 | sou.Pitch=pit or 1 | |
765 | sou.SoundId=id | |
766 | swait() | |
767 | sou:play() | |
768 | game:GetService("Debris"):AddItem(sou,6) | |
769 | end)) | |
770 | end | |
771 | ||
772 | function clerp(a,b,t) | |
773 | local qa = {QuaternionFromCFrame(a)} | |
774 | local qb = {QuaternionFromCFrame(b)} | |
775 | local ax, ay, az = a.x, a.y, a.z | |
776 | local bx, by, bz = b.x, b.y, b.z | |
777 | local _t = 1-t | |
778 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
779 | end | |
780 | ||
781 | function QuaternionFromCFrame(cf) | |
782 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
783 | local trace = m00 + m11 + m22 | |
784 | if trace > 0 then | |
785 | local s = math.sqrt(1 + trace) | |
786 | local recip = 0.5/s | |
787 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
788 | else | |
789 | local i = 0 | |
790 | if m11 > m00 then | |
791 | i = 1 | |
792 | end | |
793 | if m22 > (i == 0 and m00 or m11) then | |
794 | i = 2 | |
795 | end | |
796 | if i == 0 then | |
797 | local s = math.sqrt(m00-m11-m22+1) | |
798 | local recip = 0.5/s | |
799 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
800 | elseif i == 1 then | |
801 | local s = math.sqrt(m11-m22-m00+1) | |
802 | local recip = 0.5/s | |
803 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
804 | elseif i == 2 then | |
805 | local s = math.sqrt(m22-m00-m11+1) | |
806 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
807 | end | |
808 | end | |
809 | end | |
810 | ||
811 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
812 | local xs, ys, zs = x + x, y + y, z + z | |
813 | local wx, wy, wz = w*xs, w*ys, w*zs | |
814 | local xx = x*xs | |
815 | local xy = x*ys | |
816 | local xz = x*zs | |
817 | local yy = y*ys | |
818 | local yz = y*zs | |
819 | local zz = z*zs | |
820 | 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)) | |
821 | end | |
822 | ||
823 | function QuaternionSlerp(a, b, t) | |
824 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
825 | local startInterp, finishInterp; | |
826 | if cosTheta >= 0.0001 then | |
827 | if (1 - cosTheta) > 0.0001 then | |
828 | local theta = math.acos(cosTheta) | |
829 | local invSinTheta = 1/math.sin(theta) | |
830 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
831 | finishInterp = math.sin(t*theta)*invSinTheta | |
832 | else | |
833 | startInterp = 1-t | |
834 | finishInterp = t | |
835 | end | |
836 | else | |
837 | if (1+cosTheta) > 0.0001 then | |
838 | local theta = math.acos(-cosTheta) | |
839 | local invSinTheta = 1/math.sin(theta) | |
840 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
841 | finishInterp = math.sin(t*theta)*invSinTheta | |
842 | else | |
843 | startInterp = t-1 | |
844 | finishInterp = t | |
845 | end | |
846 | end | |
847 | 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 | |
848 | end | |
849 | ||
850 | local function CFrameFromTopBack(at, top, back) | |
851 | local right = top:Cross(back) | |
852 | return CFrame.new(at.x, at.y, at.z, | |
853 | right.x, top.x, back.x, | |
854 | right.y, top.y, back.y, | |
855 | right.z, top.z, back.z) | |
856 | end | |
857 | ||
858 | function Triangle(a, b, c) | |
859 | local edg1 = (c-a):Dot((b-a).unit) | |
860 | local edg2 = (a-b):Dot((c-b).unit) | |
861 | local edg3 = (b-c):Dot((a-c).unit) | |
862 | if edg1 <= (b-a).magnitude and edg1 >= 0 then | |
863 | a, b, c = a, b, c | |
864 | elseif edg2 <= (c-b).magnitude and edg2 >= 0 then | |
865 | a, b, c = b, c, a | |
866 | elseif edg3 <= (a-c).magnitude and edg3 >= 0 then | |
867 | a, b, c = c, a, b | |
868 | else | |
869 | assert(false, "unreachable") | |
870 | end | |
871 | ||
872 | local len1 = (c-a):Dot((b-a).unit) | |
873 | local len2 = (b-a).magnitude - len1 | |
874 | local width = (a + (b-a).unit*len1 - c).magnitude | |
875 | ||
876 | local maincf = CFrameFromTopBack(a, (b-a):Cross(c-b).unit, -(b-a).unit) | |
877 | ||
878 | local list = {} | |
879 | ||
880 | if len1 > 0.01 then | |
881 | local w1 = Instance.new('WedgePart', m) | |
882 | game:GetService("Debris"):AddItem(w1,5) | |
883 | w1.Material = "SmoothPlastic" | |
884 | w1.FormFactor = 'Custom' | |
885 | w1.BrickColor = BrickColor.new("Really red") | |
886 | w1.Transparency = 0 | |
887 | w1.Reflectance = 0 | |
888 | w1.Material = "SmoothPlastic" | |
889 | w1.CanCollide = false | |
890 | local l1 = Instance.new("PointLight",w1) | |
891 | l1.Color = Color3.new(170,0,0) | |
892 | NoOutline(w1) | |
893 | local sz = Vector3.new(0.2, width, len1) | |
894 | w1.Size = sz | |
895 | local sp = Instance.new("SpecialMesh",w1) | |
896 | sp.MeshType = "Wedge" | |
897 | sp.Scale = Vector3.new(0,1,1) * sz/w1.Size | |
898 | w1:BreakJoints() | |
899 | w1.Anchored = true | |
900 | w1.Parent = workspace | |
901 | w1.Transparency = 0.7 | |
902 | table.insert(Effects,{w1,"Disappear",.01}) | |
903 | w1.CFrame = maincf*CFrame.Angles(math.pi,0,math.pi/2)*CFrame.new(0,width/2,len1/2) | |
904 | table.insert(list,w1) | |
905 | end | |
906 | ||
907 | if len2 > 0.01 then | |
908 | local w2 = Instance.new('WedgePart', m) | |
909 | game:GetService("Debris"):AddItem(w2,5) | |
910 | w2.Material = "SmoothPlastic" | |
911 | w2.FormFactor = 'Custom' | |
912 | w2.BrickColor = BrickColor.new("Really red") | |
913 | w2.Transparency = 0 | |
914 | w2.Reflectance = 0 | |
915 | w2.Material = "SmoothPlastic" | |
916 | w2.CanCollide = false | |
917 | local l2 = Instance.new("PointLight",w2) | |
918 | l2.Color = Color3.new(170,0,0) | |
919 | NoOutline(w2) | |
920 | local sz = Vector3.new(0.2, width, len2) | |
921 | w2.Size = sz | |
922 | local sp = Instance.new("SpecialMesh",w2) | |
923 | sp.MeshType = "Wedge" | |
924 | sp.Scale = Vector3.new(0,1,1) * sz/w2.Size | |
925 | w2:BreakJoints() | |
926 | w2.Anchored = true | |
927 | w2.Parent = workspace | |
928 | w2.Transparency = 0.7 | |
929 | table.insert(Effects,{w2,"Disappear",.01}) | |
930 | w2.CFrame = maincf*CFrame.Angles(math.pi,math.pi,-math.pi/2)*CFrame.new(0,width/2,-len1 - len2/2) | |
931 | table.insert(list,w2) | |
932 | end | |
933 | return unpack(list) | |
934 | end | |
935 | ||
936 | ||
937 | function Damagefunc(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
938 | if hit.Parent == nil then | |
939 | return | |
940 | end | |
941 | local h = hit.Parent:FindFirstChild("Humanoid") | |
942 | for _, v in pairs(hit.Parent:children()) do | |
943 | if v:IsA("Humanoid") then | |
944 | h = v | |
945 | end | |
946 | end | |
947 | if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
948 | if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then | |
949 | return | |
950 | end | |
951 | local c = Create("ObjectValue")({ | |
952 | Name = "creator", | |
953 | Value = game:service("Players").LocalPlayer, | |
954 | Parent = h | |
955 | }) | |
956 | game:GetService("Debris"):AddItem(c, 0.5) | |
957 | if HitSound ~= nil and HitPitch ~= nil then | |
958 | CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) | |
959 | end | |
960 | local Damage = math.huge | |
961 | local blocked = false | |
962 | local block = hit.Parent:findFirstChild("Block") | |
963 | if block ~= nil and block.className == "IntValue" and block.Value > 0 then | |
964 | blocked = true | |
965 | block.Value = block.Value - 1 | |
966 | print(block.Value) | |
967 | end | |
968 | if blocked == false then | |
969 | HitHealth = h.Health | |
970 | h.Health = h.Health - Damage | |
971 | if HitHealth ~= h.Health and HitHealth ~= 0 and 0 >= h.Health and h.Parent.Name ~= "Hologram" then | |
972 | print("gained kill") | |
973 | end | |
974 | ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color) | |
975 | else | |
976 | h.Health = h.Health - Damage / 2 | |
977 | ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, Part.BrickColor.Color) | |
978 | end | |
979 | if Type == "Knockdown" then | |
980 | local hum = hit.Parent.Humanoid | |
981 | hum.PlatformStand = true | |
982 | coroutine.resume(coroutine.create(function(HHumanoid) | |
983 | swait(1) | |
984 | HHumanoid.PlatformStand = false | |
985 | end), hum) | |
986 | local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit | |
987 | local bodvol = Create("BodyVelocity")({ | |
988 | velocity = angle * knockback, | |
989 | P = 5000, | |
990 | maxForce = Vector3.new(8000, 8000, 8000), | |
991 | Parent = hit | |
992 | }) | |
993 | local rl = Create("BodyAngularVelocity")({ | |
994 | P = 3000, | |
995 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
996 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
997 | Parent = hit | |
998 | }) | |
999 | game:GetService("Debris"):AddItem(bodvol, 0.5) | |
1000 | game:GetService("Debris"):AddItem(rl, 0.5) | |
1001 | elseif Type == "Normal" then | |
1002 | local vp = Create("BodyVelocity")({ | |
1003 | P = 500, | |
1004 | maxForce = Vector3.new(math.huge, 0, math.huge), | |
1005 | velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05 | |
1006 | }) | |
1007 | if knockback > 0 then | |
1008 | vp.Parent = hit.Parent.Torso | |
1009 | end | |
1010 | game:GetService("Debris"):AddItem(vp, 0.5) | |
1011 | elseif Type == "Up" then | |
1012 | local bodyVelocity = Create("BodyVelocity")({ | |
1013 | velocity = Vector3.new(0, 20, 0), | |
1014 | P = 5000, | |
1015 | maxForce = Vector3.new(8000, 8000, 8000), | |
1016 | Parent = hit | |
1017 | }) | |
1018 | game:GetService("Debris"):AddItem(bodyVelocity, 0.5) | |
1019 | local bodyVelocity = Create("BodyVelocity")({ | |
1020 | velocity = Vector3.new(0, 20, 0), | |
1021 | P = 5000, | |
1022 | maxForce = Vector3.new(8000, 8000, 8000), | |
1023 | Parent = hit | |
1024 | }) | |
1025 | game:GetService("Debris"):AddItem(bodyVelocity, 1) | |
1026 | elseif Type == "Leech" then | |
1027 | local hum = hit.Parent.Humanoid | |
1028 | if hum ~= nil then | |
1029 | for i = 0, 2 do | |
1030 | Effects.Sphere.Create(BrickColor.new("Bright red"), hit.Parent.Torso.CFrame * cn(0, 0, 0) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 15, 1, 0, 5, 0, 0.02) | |
1031 | end | |
1032 | Humanoid.Health = Humanoid.Health + 10 | |
1033 | end | |
1034 | elseif Type == "UpKnock" then | |
1035 | local hum = hit.Parent.Humanoid | |
1036 | hum.PlatformStand = true | |
1037 | if hum ~= nil then | |
1038 | hitr = true | |
1039 | end | |
1040 | coroutine.resume(coroutine.create(function(HHumanoid) | |
1041 | swait(5) | |
1042 | HHumanoid.PlatformStand = false | |
1043 | hitr = false | |
1044 | end), hum) | |
1045 | local bodyVelocity = Create("BodyVelocity")({ | |
1046 | velocity = Vector3.new(0, 20, 0), | |
1047 | P = 5000, | |
1048 | maxForce = Vector3.new(8000, 8000, 8000), | |
1049 | Parent = hit | |
1050 | }) | |
1051 | game:GetService("Debris"):AddItem(bodyVelocity, 0.5) | |
1052 | local bodyVelocity = Create("BodyVelocity")({ | |
1053 | velocity = Vector3.new(0, 20, 0), | |
1054 | P = 5000, | |
1055 | maxForce = Vector3.new(8000, 8000, 8000), | |
1056 | Parent = hit | |
1057 | }) | |
1058 | game:GetService("Debris"):AddItem(bodyVelocity, 1) | |
1059 | elseif Type == "Snare" then | |
1060 | local bp = Create("BodyPosition")({ | |
1061 | P = 2000, | |
1062 | D = 100, | |
1063 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
1064 | position = hit.Parent.Torso.Position, | |
1065 | Parent = hit.Parent.Torso | |
1066 | }) | |
1067 | game:GetService("Debris"):AddItem(bp, 1) | |
1068 | elseif Type == "Slashnare" then | |
1069 | Effects.Block.Create(BrickColor.new("Pastel Blue"), hit.Parent.Torso.CFrame * cn(0, 0, 0), 15*4, 15*4, 15*4, 3*4, 3*4, 3*4, 0.07) | |
1070 | for i = 1, math.random(4, 5) do | |
1071 | Effects.Sphere.Create(BrickColor.new("Teal"), hit.Parent.Torso.CFrame * cn(math.random(-5, 5), math.random(-5, 5), math.random(-5, 5)) * angles(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 15, 1, 0, 5, 0, 0.02) | |
1072 | end | |
1073 | local bp = Create("BodyPosition")({ | |
1074 | P = 2000, | |
1075 | D = 100, | |
1076 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
1077 | position = hit.Parent.Torso.Position, | |
1078 | Parent = hit.Parent.Torso | |
1079 | }) | |
1080 | game:GetService("Debris"):AddItem(bp, 1) | |
1081 | elseif Type == "Spike" then | |
1082 | CreateBigIceSword(hit.Parent.Torso.CFrame) | |
1083 | local bp = Create("BodyPosition")({ | |
1084 | P = 2000, | |
1085 | D = 100, | |
1086 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
1087 | position = hit.Parent.Torso.Position, | |
1088 | Parent = hit.Parent.Torso | |
1089 | }) | |
1090 | game:GetService("Debris"):AddItem(bp, 1) | |
1091 | elseif Type == "Freeze" then | |
1092 | local BodPos = Create("BodyPosition")({ | |
1093 | P = 50000, | |
1094 | D = 1000, | |
1095 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
1096 | position = hit.Parent.Torso.Position, | |
1097 | Parent = hit.Parent.Torso | |
1098 | }) | |
1099 | local BodGy = Create("BodyGyro")({ | |
1100 | maxTorque = Vector3.new(400000, 400000, 400000) * math.huge, | |
1101 | P = 20000, | |
1102 | Parent = hit.Parent.Torso, | |
1103 | cframe = hit.Parent.Torso.CFrame | |
1104 | }) | |
1105 | hit.Parent.Torso.Anchored = true | |
1106 | coroutine.resume(coroutine.create(function(Part) | |
1107 | swait(1.5) | |
1108 | Part.Anchored = false | |
1109 | end), hit.Parent.Torso) | |
1110 | game:GetService("Debris"):AddItem(BodPos, 3) | |
1111 | game:GetService("Debris"):AddItem(BodGy, 3) | |
1112 | end | |
1113 | local debounce = Create("BoolValue")({ | |
1114 | Name = "DebounceHit", | |
1115 | Parent = hit.Parent, | |
1116 | Value = true | |
1117 | }) | |
1118 | game:GetService("Debris"):AddItem(debounce, Delay) | |
1119 | c = Instance.new("ObjectValue") | |
1120 | c.Name = "creator" | |
1121 | c.Value = Player | |
1122 | c.Parent = h | |
1123 | game:GetService("Debris"):AddItem(c, 0.5) | |
1124 | end | |
1125 | end | |
1126 | function ShowDamage(Pos, Text, Time, Color) | |
1127 | local Rate = 0.03333333333333333 | |
1128 | local Pos = Pos or Vector3.new(0, 0, 0) | |
1129 | local Text = Text or "" | |
1130 | local Time = Time or 2 | |
1131 | local Color = Color or Color3.new(1, 0, 1) | |
1132 | local EffectPart = CreatePart(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
1133 | EffectPart.Anchored = true | |
1134 | local BillboardGui = Create("BillboardGui")({ | |
1135 | Size = UDim2.new(3, 0, 3, 0), | |
1136 | Adornee = EffectPart, | |
1137 | Parent = EffectPart | |
1138 | }) | |
1139 | local TextLabel = Create("TextLabel")({ | |
1140 | BackgroundTransparency = 1, | |
1141 | Size = UDim2.new(1, 0, 1, 0), | |
1142 | Text = Text, | |
1143 | TextColor3 = Color, | |
1144 | TextScaled = true, | |
1145 | Font = Enum.Font.ArialBold, | |
1146 | Parent = BillboardGui | |
1147 | }) | |
1148 | game.Debris:AddItem(EffectPart, Time + 0.1) | |
1149 | EffectPart.Parent = game:GetService("Workspace") | |
1150 | delay(0, function() | |
1151 | local Frames = Time / Rate | |
1152 | for Frame = 1, Frames do | |
1153 | wait(Rate) | |
1154 | local Percent = Frame / Frames | |
1155 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
1156 | TextLabel.TextTransparency = Percent | |
1157 | end | |
1158 | if EffectPart and EffectPart.Parent then | |
1159 | EffectPart:Destroy() | |
1160 | end | |
1161 | end) | |
1162 | end | |
1163 | function MagniDamage(Part, magni, mindam, maxdam, knock, Type) | |
1164 | for _, c in pairs(workspace:children()) do | |
1165 | local hum = c:findFirstChild("Humanoid") | |
1166 | if hum ~= nil then | |
1167 | local head = c:findFirstChild("Torso") | |
1168 | if head ~= nil then | |
1169 | local targ = head.Position - Part.Position | |
1170 | local mag = targ.magnitude | |
1171 | if magni >= mag and c.Name ~= Player.Name then | |
1172 | Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "rbxassetid://231917784", 1) | |
1173 | end | |
1174 | end | |
1175 | end | |
1176 | end | |
1177 | end | |
1178 | ||
1179 | function MagniDamageWithEffect(Part, magni, mindam, maxdam, knock, Type) | |
1180 | for _, c in pairs(workspace:children()) do | |
1181 | local hum = c:findFirstChild("Humanoid") | |
1182 | if hum ~= nil then | |
1183 | local head = c:findFirstChild("Torso") | |
1184 | if head ~= nil then | |
1185 | local targ = head.Position - Part.Position | |
1186 | local mag = targ.magnitude | |
1187 | if magni >= mag and c.Name ~= Player.Name then | |
1188 | MagicBlock(BrickColor.new("Pastel light blue"),head.CFrame,5,5,5,1,1,1,0.05) | |
1189 | Damagefunc(head, head, mindam, maxdam, knock, Type, RootPart, 0.1, "rbxassetid://231917784", 1) | |
1190 | end | |
1191 | end | |
1192 | end | |
1193 | end | |
1194 | end | |
1195 | ||
1196 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
1197 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
1198 | end | |
1199 | ||
1200 | function SkullEffect(brickcolor,cframe,x1,y1,z1,delay) | |
1201 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1202 | prt.Anchored=true | |
1203 | prt.CFrame=cframe | |
1204 | local msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=4770583",vt(0,0,0),vt(x1,y1,z1)) | |
1205 | --http://www.roblox.com/asset/?id=4770560 | |
1206 | game:GetService("Debris"):AddItem(prt,2) | |
1207 | CF=prt.CFrame | |
1208 | coroutine.resume(coroutine.create(function(Part,Mesh,TehCF) | |
1209 | for i=0,1,0.2 do | |
1210 | wait() | |
1211 | Part.CFrame=CF*cf(0,0,-0.4) | |
1212 | end | |
1213 | for i=0,1,delay do | |
1214 | wait() | |
1215 | --Part.CFrame=CF*cf((math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5,(math.random(-1,0)+math.random())/5) | |
1216 | Mesh.Scale=Mesh.Scale | |
1217 | end | |
1218 | for i=0,1,0.1 do | |
1219 | wait() | |
1220 | Part.Transparency=i | |
1221 | end | |
1222 | Part.Parent=nil | |
1223 | end),prt,msh,CF) | |
1224 | end | |
1225 | ||
1226 | function MagicBlock(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1227 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1228 | prt.Anchored=true | |
1229 | prt.Material = "Neon" | |
1230 | prt.CFrame=cframe | |
1231 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1232 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1233 | game:GetService("Debris"):AddItem(prt,5) | |
1234 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1235 | for i=0,1,delay do | |
1236 | swait() | |
1237 | Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1238 | Part.Transparency=i | |
1239 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1240 | end | |
1241 | Part.Parent=nil | |
1242 | end),prt,msh) | |
1243 | end | |
1244 | ||
1245 | function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
1246 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1247 | prt.Anchored=true | |
1248 | prt.Material = "Neon" | |
1249 | prt.CFrame=cframe | |
1250 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1251 | game:GetService("Debris"):AddItem(prt,5) | |
1252 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1253 | local rtype = rottype | |
1254 | for i=0,1,delay do | |
1255 | swait() | |
1256 | if rtype == 1 then | |
1257 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1258 | elseif rtype == 2 then | |
1259 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1260 | end | |
1261 | Part.Transparency=i | |
1262 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1263 | end | |
1264 | Part.Parent=nil | |
1265 | end),prt,msh) | |
1266 | end | |
1267 | ||
1268 | function MagicSphere(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1269 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1270 | prt.Anchored=true | |
1271 | prt.CFrame=cframe | |
1272 | prt.CFrame=prt.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1273 | msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
1274 | game:GetService("Debris"):AddItem(prt,5) | |
1275 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1276 | for i=0,1,delay do | |
1277 | wait() | |
1278 | Part.Transparency=i | |
1279 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1280 | end | |
1281 | Part.Parent=nil | |
1282 | end),prt,msh) | |
1283 | end | |
1284 | ||
1285 | function MagicBlockSteady(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
1286 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1287 | prt.Anchored=true | |
1288 | prt.Material = "Neon" | |
1289 | prt.CFrame=cframe | |
1290 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1291 | game:GetService("Debris"):AddItem(prt,5) | |
1292 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1293 | local rtype = rottype | |
1294 | for i=0,1,delay do | |
1295 | swait() | |
1296 | if rtype == 1 then | |
1297 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1298 | elseif rtype == 2 then | |
1299 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1300 | end | |
1301 | Part.Transparency=i | |
1302 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1303 | end | |
1304 | Part.Parent=nil | |
1305 | end),prt,msh) | |
1306 | end | |
1307 | ||
1308 | function MagicShock(brickcolor,cframe,x1,y1,x3,y3,delay,rottype) | |
1309 | local prt=part(3,char,1,1,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1310 | prt.Anchored=true | |
1311 | prt.Material = "Neon" | |
1312 | prt.CFrame=cframe | |
1313 | local dec = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt) | |
1314 | local dec2 = decal(prt.Color,"http://www.roblox.com/asset/?id=874580939","Front",prt) | |
1315 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01)) | |
1316 | game:GetService("Debris"):AddItem(prt,5) | |
1317 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1318 | local rtype = rottype | |
1319 | for i=0,1,delay do | |
1320 | swait() | |
1321 | if rtype == 1 then | |
1322 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1323 | elseif rtype == 2 then | |
1324 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1325 | end | |
1326 | dec.Transparency=i | |
1327 | dec2.Transparency=i | |
1328 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
1329 | end | |
1330 | Part.Parent=nil | |
1331 | end),prt,msh) | |
1332 | end | |
1333 | ||
1334 | function MagicShockAlt(brickcolor,cframe,x1,y1,x3,y3,delay,rottype) | |
1335 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1336 | prt.Anchored=true | |
1337 | prt.Material = "Neon" | |
1338 | prt.CFrame=cframe | |
1339 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,0.01)) | |
1340 | game:GetService("Debris"):AddItem(prt,5) | |
1341 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1342 | local rtype = rottype | |
1343 | for i=0,1,delay do | |
1344 | swait() | |
1345 | if rtype == 1 then | |
1346 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1347 | elseif rtype == 2 then | |
1348 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1349 | end | |
1350 | prt.Transparency=i | |
1351 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
1352 | end | |
1353 | Part.Parent=nil | |
1354 | end),prt,msh) | |
1355 | end | |
1356 | ||
1357 | function MagicShockAltCircle(brickcolor,cframe,x1,z1,x3,z3,delay,rottype) | |
1358 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1359 | prt.Anchored=true | |
1360 | prt.Material = "Neon" | |
1361 | prt.CFrame=cframe | |
1362 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,1,z1)) | |
1363 | game:GetService("Debris"):AddItem(prt,5) | |
1364 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1365 | local rtype = rottype | |
1366 | for i=0,1,delay do | |
1367 | swait() | |
1368 | if rtype == 1 then | |
1369 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0.1,0) | |
1370 | elseif rtype == 2 then | |
1371 | prt.CFrame = prt.CFrame*CFrame.Angles(0,-0.1,0) | |
1372 | end | |
1373 | prt.Transparency=i | |
1374 | Mesh.Scale=Mesh.Scale+vt(x3,0,z3) | |
1375 | end | |
1376 | Part.Parent=nil | |
1377 | end),prt,msh) | |
1378 | end | |
1379 | ||
1380 | function MagicShockTrailAlt(brickcolor,cframe,x1,y1,z1,x3,y3,delay,rottype) | |
1381 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1382 | prt.Anchored=true | |
1383 | prt.Material = "Neon" | |
1384 | prt.CFrame=cframe | |
1385 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1386 | game:GetService("Debris"):AddItem(prt,5) | |
1387 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1388 | local rtype = rottype | |
1389 | for i=0,1,delay do | |
1390 | swait() | |
1391 | if rtype == 1 then | |
1392 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1393 | elseif rtype == 2 then | |
1394 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1395 | end | |
1396 | prt.Transparency=i | |
1397 | Mesh.Scale=Mesh.Scale+vt(x3,y3,0) | |
1398 | end | |
1399 | Part.Parent=nil | |
1400 | end),prt,msh) | |
1401 | end | |
1402 | ||
1403 | function MagicShockTrailAlt2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay,rottype) | |
1404 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1405 | prt.Anchored=true | |
1406 | prt.Material = "Neon" | |
1407 | prt.CFrame=cframe | |
1408 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1409 | game:GetService("Debris"):AddItem(prt,5) | |
1410 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1411 | local rtype = rottype | |
1412 | for i=0,1,delay do | |
1413 | swait() | |
1414 | if rtype == 1 then | |
1415 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,0.1) | |
1416 | elseif rtype == 2 then | |
1417 | prt.CFrame = prt.CFrame*CFrame.Angles(0,0,-0.1) | |
1418 | end | |
1419 | prt.Transparency=i | |
1420 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1421 | end | |
1422 | Part.Parent=nil | |
1423 | end),prt,msh) | |
1424 | end | |
1425 | ||
1426 | function MagicBlock2(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay) | |
1427 | local prt=part(3,char,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1428 | prt.Anchored=false | |
1429 | prt.CFrame=cframe | |
1430 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1431 | local wld=weld(prt,prt,Parent,cframe) | |
1432 | game:GetService("Debris"):AddItem(prt,5) | |
1433 | coroutine.resume(coroutine.create(function(Part,Mesh,Weld) | |
1434 | for i=0,1,delay do | |
1435 | wait() | |
1436 | Weld.C0=euler(math.random(-50,50),math.random(-50,50),math.random(-50,50))*cframe | |
1437 | --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1438 | Part.Transparency=i | |
1439 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1440 | end | |
1441 | Part.Parent=nil | |
1442 | end),prt,msh,wld) | |
1443 | end | |
1444 | ||
1445 | function MagicBlock3(brickcolor,cframe,Parent,x1,y1,z1,x3,y3,z3,delay) | |
1446 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1447 | prt.Anchored=false | |
1448 | prt.CFrame=cframe | |
1449 | msh=mesh("BlockMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1450 | local wld=weld(prt,prt,Parent,euler(0,0,0)*cf(0,0,0)) | |
1451 | game:GetService("Debris"):AddItem(prt,5) | |
1452 | coroutine.resume(coroutine.create(function(Part,Mesh,Weld) | |
1453 | for i=0,1,delay do | |
1454 | wait() | |
1455 | Weld.C0=euler(i*20,0,0) | |
1456 | --Part.CFrame=Part.CFrame*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1457 | Part.Transparency=i | |
1458 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1459 | end | |
1460 | Part.Parent=nil | |
1461 | end),prt,msh,wld) | |
1462 | end | |
1463 | ||
1464 | function MagicCircle2(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1465 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1466 | prt.Anchored=true | |
1467 | prt.CFrame=cframe | |
1468 | local msh=mesh("CylinderMesh",prt,"","",vt(0,0,0),vt(x1,y1,z1)) | |
1469 | game:GetService("Debris"):AddItem(prt,2) | |
1470 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1471 | for i=0,1,delay do | |
1472 | wait() | |
1473 | Part.CFrame=Part.CFrame | |
1474 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1475 | local prt2=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1476 | prt2.Anchored=true | |
1477 | prt2.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1478 | local msh2=mesh("SpecialMesh",prt2,"Sphere","",vt(0,0,0),vt(0.5,0.5,0.5)) | |
1479 | game:GetService("Debris"):AddItem(prt2,2) | |
1480 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1481 | for i=0,1,0.1 do | |
1482 | wait() | |
1483 | Part.CFrame=Part.CFrame*cf(0,0.5,0) | |
1484 | end | |
1485 | Part.Parent=nil | |
1486 | end),prt2,msh2) | |
1487 | end | |
1488 | for i=0,1,delay*2 do | |
1489 | wait() | |
1490 | Part.CFrame=Part.CFrame | |
1491 | Mesh.Scale=vt((x1+x3)-(x1+x3)*i,(y1+y3)-(y1+y3)*i,(z1+z3)-(z1+z3)*i) | |
1492 | end | |
1493 | Part.Parent=nil | |
1494 | end),prt,msh) | |
1495 | end | |
1496 | ||
1497 | function MagicCircle(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1498 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1499 | prt.Anchored=true | |
1500 | prt.CFrame=cframe | |
1501 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
1502 | game:GetService("Debris"):AddItem(prt,2) | |
1503 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1504 | for i=0,1,delay do | |
1505 | wait() | |
1506 | Part.CFrame=Part.CFrame | |
1507 | Part.Transparency=i | |
1508 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1509 | end | |
1510 | Part.Parent=nil | |
1511 | end),prt,msh) | |
1512 | end | |
1513 | ||
1514 | function BreakEffect(brickcolor,cframe,x1,y1,z1) | |
1515 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1516 | prt.Anchored=true | |
1517 | prt.CFrame=cframe*euler(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
1518 | local msh=mesh("SpecialMesh",prt,"Sphere","",vt(0,0,0),vt(x1,y1,z1)) | |
1519 | game:GetService("Debris"):AddItem(prt,2) | |
1520 | coroutine.resume(coroutine.create(function(Part,CF,Numbb,randnumb) | |
1521 | CF=Part.CFrame | |
1522 | Numbb=0 | |
1523 | randnumb=math.random()/10 | |
1524 | rand1=math.random()/10 | |
1525 | for i=0,1,rand1 do | |
1526 | wait() | |
1527 | CF=CF*cf(0,math.random()/2,0) | |
1528 | --Part.CFrame=Part.CFrame*euler(0.5,0,0)*cf(0,1,0) | |
1529 | Part.CFrame=CF*euler(Numbb,0,0) | |
1530 | Part.Transparency=i | |
1531 | Numbb=Numbb+randnumb | |
1532 | end | |
1533 | Part.Parent=nil | |
1534 | end),prt,CF,Numbb,randnumb) | |
1535 | end | |
1536 | ||
1537 | function MagicWaveThing(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1538 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1539 | prt.Anchored=true | |
1540 | prt.CFrame=cframe | |
1541 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=1051557",vt(0,0,0),vt(x1,y1,z1)) | |
1542 | game:GetService("Debris"):AddItem(prt,5) | |
1543 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1544 | for i=0,1,delay do | |
1545 | wait() | |
1546 | Part.CFrame=Part.CFrame*euler(0,0.7,0) | |
1547 | Part.Transparency=i | |
1548 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1549 | end | |
1550 | Part.Parent=nil | |
1551 | end),prt,msh) | |
1552 | end | |
1553 | ||
1554 | function WaveEffect(brickcolor,cframe,x1,y1,z1,x3,y3,z3,delay) | |
1555 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1556 | prt.Anchored=true | |
1557 | prt.CFrame=cframe | |
1558 | msh=mesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=20329976",vt(0,0,0),vt(x1,y1,z1)) | |
1559 | game:GetService("Debris"):AddItem(prt,2) | |
1560 | coroutine.resume(coroutine.create(function(Part,Mesh) | |
1561 | for i=0,1,delay do | |
1562 | wait() | |
1563 | Part.CFrame=Part.CFrame*cf(0,y3/2,0) | |
1564 | Part.Transparency=i | |
1565 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
1566 | end | |
1567 | Part.Parent=nil | |
1568 | end),prt,msh) | |
1569 | end | |
1570 | ||
1571 | function StravEffect(brickcolor,cframe,x,y,z,x1,y1,z1,delay) | |
1572 | local prt=part(3,workspace,0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
1573 | prt.Anchored=true | |
1574 | prt.CFrame=cframe*cf(x,y,z) | |
1575 | msh=mesh("SpecialMesh",prt,"FileMesh","rbxassetid://168892363",vt(0,0,0),vt(x1,y1,z1)) | |
1576 | game:GetService("Debris"):AddItem(prt,5) | |
1577 | coroutine.resume(coroutine.create(function(Part,Mesh,ex,why,zee) | |
1578 | local num=math.random() | |
1579 | local num2=math.random(-3,2)+math.random() | |
1580 | local numm=0 | |
1581 | for i=0,1,delay*2 do | |
1582 | swait() | |
1583 | Part.CFrame=cframe*euler(0,numm*num*10,0)*cf(ex,why,zee)*cf(-i*10,num2,0) | |
1584 | Part.Transparency=i | |
1585 | numm=numm+0.01 | |
1586 | end | |
1587 | Part.Parent=nil | |
1588 | Mesh.Parent=nil | |
1589 | end),prt,msh,x,y,z) | |
1590 | end | |
1591 | ||
1592 | function dmgstart(dmg,what) | |
1593 | hitcon = what.Touched:connect(function(hit) | |
1594 | local hum = hit.Parent:FindFirstChild("Humanoid") | |
1595 | if hum and not hum:IsDescendantOf(Character) then | |
1596 | hum:TakeDamage(dmg) | |
1597 | end | |
1598 | end) | |
1599 | end | |
1600 | ||
1601 | function dmgstop() | |
1602 | hitcon:disconnect() | |
1603 | end | |
1604 | ||
1605 | function Cloak() | |
1606 | Face.Parent=nil | |
1607 | cloaked=true | |
1608 | for _,v in pairs(Torso.Parent:children()) do | |
1609 | if v.className=="Part" and v.Name~="HumanoidRootPart" then | |
1610 | coroutine.resume(coroutine.create(function() | |
1611 | for i=0,1,0.2 do | |
1612 | wait() | |
1613 | v.Transparency=i | |
1614 | end | |
1615 | v.Transparency=1 | |
1616 | end)) | |
1617 | end | |
1618 | if v.className=="Hat" then | |
1619 | hatp=v.Handle | |
1620 | coroutine.resume(coroutine.create(function(derp) | |
1621 | for i=0,1,0.2 do | |
1622 | wait() | |
1623 | derp.Transparency=i | |
1624 | end | |
1625 | derp.Transparency=1 | |
1626 | end),hatp) | |
1627 | end | |
1628 | end | |
1629 | for _,v in pairs(m:children()) do | |
1630 | if v.className=="Part" then | |
1631 | coroutine.resume(coroutine.create(function() | |
1632 | for i=0,1,0.2 do | |
1633 | wait() | |
1634 | v.Transparency=i | |
1635 | end | |
1636 | v.Transparency=1 | |
1637 | end)) | |
1638 | end | |
1639 | end | |
1640 | end | |
1641 | ||
1642 | function UnCloak() | |
1643 | so("http://roblox.com/asset/?id=2767090",Torso,1,1.1) | |
1644 | Face.Parent=Head | |
1645 | cloaked=false | |
1646 | for _,v in pairs(Torso.Parent:children()) do | |
1647 | if v.className=="Part" and v.Name~="HumanoidRootPart" then | |
1648 | coroutine.resume(coroutine.create(function() | |
1649 | for i=0,1,0.1 do | |
1650 | wait() | |
1651 | v.Transparency=v.Transparency-0.1 | |
1652 | end | |
1653 | v.Transparency=0 | |
1654 | end)) | |
1655 | end | |
1656 | if v.className=="Hat" then | |
1657 | hatp=v.Handle | |
1658 | coroutine.resume(coroutine.create(function(derp) | |
1659 | for i=0,1,0.1 do | |
1660 | wait() | |
1661 | derp.Transparency=derp.Transparency-0.1 | |
1662 | end | |
1663 | derp.Transparency=0 | |
1664 | end),hatp) | |
1665 | end | |
1666 | end | |
1667 | for _,v in pairs(m:children()) do | |
1668 | if v.className=="Part" and v.Name~="hitbox" and v.Name~='tip' then | |
1669 | coroutine.resume(coroutine.create(function() | |
1670 | for i=0,1,0.1 do | |
1671 | wait() | |
1672 | v.Transparency=v.Transparency-0.1 | |
1673 | end | |
1674 | v.Transparency=0 | |
1675 | end)) | |
1676 | v.Transparency=0 | |
1677 | end | |
1678 | end | |
1679 | end | |
1680 | ||
1681 | local origcolor = BrickColor.new("Toothpaste") | |
1682 | ---- This section of explosions. | |
1683 | function Explode(rad,par,pitch,vol,mindam,maxdam) | |
1684 | local expart = Instance.new("Part",char) | |
1685 | local expart2 = Instance.new("Part",char) | |
1686 | local rin = Instance.new("Part",char) | |
1687 | local rin2 = Instance.new("Part",char) | |
1688 | local partMesh = Instance.new("SpecialMesh",expart) | |
1689 | partMesh.MeshType = "Sphere" | |
1690 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
1691 | partMesh2.MeshType = "Sphere" | |
1692 | local partMesh3 = Instance.new("SpecialMesh",rin) | |
1693 | partMesh3.MeshType = "Brick" | |
1694 | local partMesh4 = Instance.new("SpecialMesh",rin2) | |
1695 | partMesh4.MeshType = "Brick" | |
1696 | CFuncs["Sound"].Create("rbxassetid://165970126", expart,vol, pitch) | |
1697 | partMesh.Scale = vt(rad,rad,rad) | |
1698 | expart.Size = vt(1,1,1) | |
1699 | expart.Transparency = 0 | |
1700 | expart.Anchored = true | |
1701 | expart.Material = "Neon" | |
1702 | expart.BrickColor = bc("White") | |
1703 | expart.CFrame = par.CFrame | |
1704 | partMesh2.Scale = vt(rad,rad,rad) | |
1705 | expart2.Size = vt(1.15,1.15,1.15) | |
1706 | expart2.Transparency = 0.5 | |
1707 | expart2.Anchored = true | |
1708 | expart2.Material = "Neon" | |
1709 | expart2.BrickColor = par.BrickColor | |
1710 | expart2.CFrame = par.CFrame | |
1711 | rin.Size = vt(1.15,1.15,1.15) | |
1712 | rin.Transparency = 1 | |
1713 | rin.Anchored = true | |
1714 | rin.Material = "Neon" | |
1715 | rin.BrickColor = par.BrickColor | |
1716 | rin.CFrame = par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))) | |
1717 | rin2.Size = vt(1.15,1.15,1.15) | |
1718 | rin2.Transparency = 1 | |
1719 | rin2.Anchored = true | |
1720 | rin2.Material = "Neon" | |
1721 | rin2.BrickColor = par.BrickColor | |
1722 | rin2.CFrame = par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))) | |
1723 | partMesh3.Scale = vt(0,1,0) | |
1724 | partMesh4.Scale = vt(0,1,0) | |
1725 | local dec2 = Instance.new("Decal", rin) | |
1726 | dec2.Face = "Top" | |
1727 | dec2.Texture = "http://www.roblox.com/asset/?id=874580939" | |
1728 | dec2.Parent = rin | |
1729 | local dec2b = dec2:Clone() | |
1730 | dec2b.Face = "Bottom" | |
1731 | dec2b.Parent = rin | |
1732 | ||
1733 | local dec2a = Instance.new("Decal", rin2) | |
1734 | dec2a.Face = "Top" | |
1735 | dec2a.Texture = "http://www.roblox.com/asset/?id=874580939" | |
1736 | dec2a.Parent = rin2 | |
1737 | local dec2ab = dec2a:Clone() | |
1738 | dec2ab.Face = "Bottom" | |
1739 | dec2ab.Parent = rin2 | |
1740 | expart.CanCollide = false | |
1741 | expart2.CanCollide = false | |
1742 | rin.CanCollide = false | |
1743 | rin2.CanCollide = false | |
1744 | MagniDamage(par, rad*5, mindam, maxdam, 0, "Normal") | |
1745 | local value = 1*rad/6.5 | |
1746 | for i = 0, 199 do | |
1747 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
1748 | expart.CFrame = expart.CFrame | |
1749 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
1750 | expart2.CFrame = expart.CFrame | |
1751 | value = value - 0.035*rad/30 | |
1752 | if value < 7.5 then | |
1753 | partMesh3.Scale = partMesh3.Scale + vt(rad/5,0,rad/5) | |
1754 | rin.CFrame = rin.CFrame*CFrame.Angles(0,math.rad(1),0) | |
1755 | partMesh4.Scale = partMesh4.Scale + vt(rad/7.5,0,rad/7.5) | |
1756 | rin2.CFrame = rin2.CFrame*CFrame.Angles(0,math.rad(-1),0) | |
1757 | end | |
1758 | if value < 0 then | |
1759 | dec2.Transparency = dec2.Transparency + 0.025 | |
1760 | dec2a.Transparency = dec2a.Transparency + 0.025 | |
1761 | dec2b.Transparency = dec2b.Transparency + 0.025 | |
1762 | dec2ab.Transparency = dec2ab.Transparency + 0.025 | |
1763 | expart.Transparency = expart.Transparency + 0.025 | |
1764 | expart2.Transparency = expart2.Transparency + 0.025 | |
1765 | rin.Transparency = rin.Transparency + 0.025 | |
1766 | rin2.Transparency = rin2.Transparency + 0.025 | |
1767 | end | |
1768 | swait() | |
1769 | end | |
1770 | game:GetService("Debris"):AddItem(expart, 1) | |
1771 | game:GetService("Debris"):AddItem(expart2, 1) | |
1772 | game:GetService("Debris"):AddItem(rin, 1) | |
1773 | game:GetService("Debris"):AddItem(rin2, 1) | |
1774 | end | |
1775 | ||
1776 | function ExplodeShort(rad,par,pitch,vol,mindam,maxdam) | |
1777 | local expart = Instance.new("Part",char) | |
1778 | local expart2 = Instance.new("Part",char) | |
1779 | local partMesh = Instance.new("SpecialMesh",expart) | |
1780 | partMesh.MeshType = "Sphere" | |
1781 | local partMesh2 = Instance.new("SpecialMesh",expart2) | |
1782 | partMesh2.MeshType = "Sphere" | |
1783 | CFuncs["Sound"].Create("http://www.roblox.com/asset/?id=142070127", expart,vol, pitch) | |
1784 | partMesh.Scale = vt(rad,rad,rad) | |
1785 | expart.Size = vt(1,1,1) | |
1786 | expart.Transparency = 0 | |
1787 | expart.Anchored = true | |
1788 | expart.Material = "Neon" | |
1789 | expart.BrickColor = bc("White") | |
1790 | expart.CFrame = par.CFrame | |
1791 | partMesh2.Scale = vt(rad,rad,rad) | |
1792 | expart2.Size = vt(1.15,1.15,1.15) | |
1793 | expart2.Transparency = 0.5 | |
1794 | expart2.Anchored = true | |
1795 | expart2.Material = "Neon" | |
1796 | expart2.BrickColor = par.BrickColor | |
1797 | expart2.CFrame = par.CFrame | |
1798 | expart.CanCollide = false | |
1799 | expart2.CanCollide = false | |
1800 | MagniDamage(par, rad*2.5, mindam, maxdam, 0, "Normal") | |
1801 | local value = 1*rad/6.5 | |
1802 | for i = 0, 75 do | |
1803 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
1804 | expart.CFrame = expart.CFrame | |
1805 | partMesh2.Scale = partMesh2.Scale + vt(value,value,value) | |
1806 | expart2.CFrame = expart.CFrame | |
1807 | value = value - 0.035*rad/5 | |
1808 | if value < 0 then | |
1809 | value = 0 | |
1810 | expart.Transparency = expart.Transparency + 0.05 | |
1811 | expart2.Transparency = expart2.Transparency + 0.05 | |
1812 | end | |
1813 | swait() | |
1814 | end | |
1815 | game:GetService("Debris"):AddItem(expart, 1) | |
1816 | game:GetService("Debris"):AddItem(expart2, 1) | |
1817 | end | |
1818 | ||
1819 | function AreaDanger(rad,par,mindam,maxdam) | |
1820 | local expart = Instance.new("Part",char) | |
1821 | local partMesh = Instance.new("SpecialMesh",expart) | |
1822 | CFuncs["Sound"].Create("rbxassetid://231917784", expart,1.5,1.15) | |
1823 | partMesh.MeshType = "Sphere" | |
1824 | partMesh.Scale = vt(rad,rad,rad) | |
1825 | expart.Size = vt(1,1,1) | |
1826 | expart.Transparency = 0.5 | |
1827 | expart.Anchored = true | |
1828 | expart.Material = "Neon" | |
1829 | expart.CanCollide = false | |
1830 | expart.BrickColor = par.BrickColor | |
1831 | expart.CFrame = par.CFrame | |
1832 | local value = 1*rad/5 | |
1833 | MagicBlock(origcolor,expart.CFrame,0,0,0,rad/2,rad/2,rad/2,0.1) | |
1834 | for i = 0, 14 do | |
1835 | wait() | |
1836 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
1837 | expart.CFrame = expart.CFrame | |
1838 | value = value - 0.035*rad | |
1839 | if value < 0 then | |
1840 | value = 0 | |
1841 | end | |
1842 | end | |
1843 | wait(0.25) | |
1844 | CFuncs["Sound"].Create("rbxassetid://588738544", expart,1.5,1) | |
1845 | wait(0.5) | |
1846 | CFuncs["Sound"].Create("rbxassetid://588737825", expart,1.5,1) | |
1847 | CFuncs["Sound"].Create("rbxassetid://231917784", expart,1.5,0.75) | |
1848 | MagniDamageWithEffect(par, rad, mindam, maxdam, 0, "Normal") | |
1849 | MagicBlock(origcolor,expart.CFrame,rad*2,rad*2,rad*2,0.1,0.1,0.1,0.025) | |
1850 | for i = 0, 14 do | |
1851 | wait() | |
1852 | partMesh.Scale = partMesh.Scale + vt(value,value,value) | |
1853 | expart.CFrame = expart.CFrame | |
1854 | value = value - 0.035*rad/2 | |
1855 | end | |
1856 | expart.Transparency = 1 | |
1857 | game:GetService("Debris"):AddItem(expart, 5) | |
1858 | end | |
1859 | ||
1860 | function Swarmsplosions(negrad,rad,par,mindam,maxdam) | |
1861 | CFuncs["Sound"].Create("rbxassetid://588737825", par, 2.5, 2) | |
1862 | CFuncs["Sound"].Create("rbxassetid://231917784", par, 2.5,1) | |
1863 | CFuncs["Sound"].Create("rbxassetid://231917744", par, 2.5,1) | |
1864 | CFuncs["Sound"].Create("rbxassetid://233856106", par, 2.5, 1) | |
1865 | MagniDamageWithEffect(par, 25, 5,10, 0, "Normal") | |
1866 | MagicBlock(origcolor,par.CFrame,5,5,5,5,5,5,0.025) | |
1867 | for i = 0, 24 do | |
1868 | MagicShockTrailAlt2(origcolor,par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),10/5,10/5,5,-0.05/5,-0.05/5,25,0.005,math.random(1,2)) | |
1869 | end | |
1870 | for i = 0, 24 do | |
1871 | local expart = Instance.new("Part",char) | |
1872 | expart.Transparency = 1 | |
1873 | expart.Anchored = true | |
1874 | expart.CanCollide = false | |
1875 | expart.CFrame = par.CFrame*CFrame.new(math.random(negrad,rad),math.random(negrad,rad),math.random(negrad,rad)) | |
1876 | CFuncs["Sound"].Create("rbxassetid://588737825", expart,1,2) | |
1877 | CFuncs["Sound"].Create("rbxassetid://231917784", expart,1.5,1.15) | |
1878 | MagniDamage(expart, rad/2, mindam, maxdam, 0, "Normal") | |
1879 | MagicBlock(origcolor,expart.CFrame,rad,rad,rad,0.1,0.1,0.1,0.025) | |
1880 | for i = 0, 9 do | |
1881 | MagicShockTrailAlt2(origcolor,expart.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),10/5,10/5,5,-0.05/5,-0.05/5,5,0.05,math.random(1,2)) | |
1882 | end | |
1883 | game:GetService("Debris"):AddItem(expart, 2) | |
1884 | wait(0.1) | |
1885 | end | |
1886 | end | |
1887 | ||
1888 | function EXterPlosion(par) | |
1889 | CFuncs["Sound"].Create("rbxassetid://919941001", par, 10, 1) | |
1890 | CFuncs["Sound"].Create("rbxassetid://138213851", par, 5,0.85) | |
1891 | CFuncs["Sound"].Create("rbxassetid://157878578", par, 5,0.2) | |
1892 | CFuncs["Sound"].Create("rbxassetid://233856106", par, 2.5, 1) | |
1893 | MagniDamageWithEffect(par, 500, 80,99, 0, "Normal") | |
1894 | MagicBlock(origcolor,par.CFrame,5,5,5,5,5,5,0.005) | |
1895 | MagicBlock(origcolor,par.CFrame,0,0,0,150,150,150,0.1) | |
1896 | for i = 0, 24 do | |
1897 | MagicShockTrailAlt2(origcolor,par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),10*5,10*5,5,-0.05*10,-0.05*10,500,0.1,math.random(1,2)) | |
1898 | end | |
1899 | for i = 0, 24 do | |
1900 | MagicShockTrailAlt2(origcolor,par.CFrame*CFrame.Angles(math.rad(math.random(-360,360)),math.rad(math.random(-360,360)),math.rad(math.random(-360,360))),10*5,10*5,5,-0.05*5,-0.05*5,50,0.005,math.random(1,2)) | |
1901 | end | |
1902 | end | |
1903 | ---- | |
1904 | ||
1905 | ||
1906 | function ring(type,pos,scale,value) | |
1907 | local type = type | |
1908 | local rng = Instance.new("Part", char) | |
1909 | rng.Anchored = true | |
1910 | rng.BrickColor = origcolor | |
1911 | rng.CanCollide = false | |
1912 | rng.FormFactor = 3 | |
1913 | rng.Name = "Ring" | |
1914 | rng.Size = Vector3.new(1, 1, 1) | |
1915 | rng.Transparency = 0 | |
1916 | rng.TopSurface = 0 | |
1917 | rng.BottomSurface = 0 | |
1918 | rng.CFrame = pos | |
1919 | local rngm = Instance.new("SpecialMesh", rng) | |
1920 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
1921 | rngm.Scale = scale | |
1922 | local scaler2 = 1 | |
1923 | if type == "Add" then | |
1924 | scaler2 = 1*value | |
1925 | elseif type == "Divide" then | |
1926 | scaler2 = 1/value | |
1927 | end | |
1928 | coroutine.resume(coroutine.create(function() | |
1929 | for i = 0,10,0.1 do | |
1930 | swait() | |
1931 | if type == "Add" then | |
1932 | scaler2 = scaler2 - 0.01*value | |
1933 | elseif type == "Divide" then | |
1934 | scaler2 = scaler2 - 0.01/value | |
1935 | end | |
1936 | rng.Transparency = rng.Transparency + 0.01 | |
1937 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0) | |
1938 | end | |
1939 | rng:Destroy() | |
1940 | end)) | |
1941 | end | |
1942 | ||
1943 | function ring2(type,pos,scale,value,color) | |
1944 | local type = type | |
1945 | local rng = Instance.new("Part", char) | |
1946 | rng.Anchored = true | |
1947 | rng.BrickColor = color | |
1948 | rng.CanCollide = false | |
1949 | rng.FormFactor = 3 | |
1950 | rng.Name = "Ring" | |
1951 | rng.Size = Vector3.new(1, 1, 1) | |
1952 | rng.Transparency = 0 | |
1953 | rng.TopSurface = 0 | |
1954 | rng.BottomSurface = 0 | |
1955 | rng.CFrame = pos | |
1956 | local rngm = Instance.new("SpecialMesh", rng) | |
1957 | rngm.MeshId = "http://www.roblox.com/asset/?id=3270017" | |
1958 | rngm.Scale = scale | |
1959 | local scaler2 = 1 | |
1960 | if type == "Add" then | |
1961 | scaler2 = 1*value | |
1962 | elseif type == "Divide" then | |
1963 | scaler2 = 1/value | |
1964 | end | |
1965 | coroutine.resume(coroutine.create(function() | |
1966 | for i = 0,10,0.1 do | |
1967 | swait() | |
1968 | if type == "Add" then | |
1969 | scaler2 = scaler2 - 0.01*value | |
1970 | elseif type == "Divide" then | |
1971 | scaler2 = scaler2 - 0.01/value | |
1972 | end | |
1973 | rng.Transparency = rng.Transparency + 0.01 | |
1974 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, 0) | |
1975 | end | |
1976 | rng:Destroy() | |
1977 | end)) | |
1978 | end | |
1979 | ||
1980 | ||
1981 | function wave(type,pos,scale,value) | |
1982 | local type = type | |
1983 | local rng = Instance.new("Part", char) | |
1984 | rng.Anchored = true | |
1985 | rng.BrickColor = origcolor | |
1986 | rng.CanCollide = false | |
1987 | rng.FormFactor = 3 | |
1988 | rng.Name = "Ring" | |
1989 | rng.Size = Vector3.new(1, 1, 1) | |
1990 | rng.Transparency = 0 | |
1991 | rng.TopSurface = 0 | |
1992 | rng.BottomSurface = 0 | |
1993 | rng.CFrame = pos | |
1994 | local rngm = Instance.new("SpecialMesh", rng) | |
1995 | rngm.MeshId = "http://www.roblox.com/asset/?id=20329976" | |
1996 | rngm.Scale = scale | |
1997 | local scaler2 = 1 | |
1998 | if type == "Add" then | |
1999 | scaler2 = 1*value | |
2000 | elseif type == "Divide" then | |
2001 | scaler2 = 1/value | |
2002 | end | |
2003 | coroutine.resume(coroutine.create(function() | |
2004 | for i = 0,10,0.1 do | |
2005 | swait() | |
2006 | if type == "Add" then | |
2007 | scaler2 = scaler2 - 0.01*value | |
2008 | elseif type == "Divide" then | |
2009 | scaler2 = scaler2 - 0.01/value | |
2010 | end | |
2011 | rng.Transparency = rng.Transparency + 0.01 | |
2012 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2) | |
2013 | end | |
2014 | rng:Destroy() | |
2015 | end)) | |
2016 | end | |
2017 | ||
2018 | function wave2(type,pos,scale,value,color) | |
2019 | local type = type | |
2020 | local rng = Instance.new("Part", char) | |
2021 | rng.Anchored = true | |
2022 | rng.BrickColor = color | |
2023 | rng.CanCollide = false | |
2024 | rng.FormFactor = 3 | |
2025 | rng.Name = "Ring" | |
2026 | rng.Size = Vector3.new(1, 1, 1) | |
2027 | rng.Transparency = 0 | |
2028 | rng.TopSurface = 0 | |
2029 | rng.BottomSurface = 0 | |
2030 | rng.CFrame = pos | |
2031 | local rngm = Instance.new("SpecialMesh", rng) | |
2032 | rngm.MeshId = "http://www.roblox.com/asset/?id=20329976" | |
2033 | rngm.Scale = scale | |
2034 | local scaler2 = 1 | |
2035 | if type == "Add" then | |
2036 | scaler2 = 1*value | |
2037 | elseif type == "Divide" then | |
2038 | scaler2 = 1/value | |
2039 | end | |
2040 | coroutine.resume(coroutine.create(function() | |
2041 | for i = 0,10,0.1 do | |
2042 | swait() | |
2043 | if type == "Add" then | |
2044 | scaler2 = scaler2 - 0.01*value | |
2045 | elseif type == "Divide" then | |
2046 | scaler2 = scaler2 - 0.01/value | |
2047 | end | |
2048 | rng.Transparency = rng.Transparency + 0.01 | |
2049 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2) | |
2050 | end | |
2051 | rng:Destroy() | |
2052 | end)) | |
2053 | end | |
2054 | ||
2055 | ||
2056 | function wind(type,pos,scale,value,speed) | |
2057 | local type = type | |
2058 | local rng = Instance.new("Part", char) | |
2059 | rng.Anchored = true | |
2060 | rng.BrickColor = origcolor | |
2061 | rng.CanCollide = false | |
2062 | rng.FormFactor = 3 | |
2063 | rng.Name = "Ring" | |
2064 | rng.Size = Vector3.new(1, 1, 1) | |
2065 | rng.Transparency = 0 | |
2066 | rng.TopSurface = 0 | |
2067 | rng.BottomSurface = 0 | |
2068 | rng.CFrame = pos | |
2069 | local rngm = Instance.new("SpecialMesh", rng) | |
2070 | rngm.MeshId = "http://www.roblox.com/asset/?id=1051557" | |
2071 | rngm.Scale = scale | |
2072 | local scaler2 = 1 | |
2073 | if type == "Add" then | |
2074 | scaler2 = 1*value | |
2075 | elseif type == "Divide" then | |
2076 | scaler2 = 1/value | |
2077 | end | |
2078 | coroutine.resume(coroutine.create(function() | |
2079 | for i = 0,10,0.1 do | |
2080 | swait() | |
2081 | if type == "Add" then | |
2082 | scaler2 = scaler2 - 0.01*value | |
2083 | elseif type == "Divide" then | |
2084 | scaler2 = scaler2 - 0.01/value | |
2085 | end | |
2086 | rng.CFrame = rng.CFrame*CFrame.Angles(0,0.025*speed,0) | |
2087 | rng.Transparency = rng.Transparency + 0.01 | |
2088 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2) | |
2089 | end | |
2090 | rng:Destroy() | |
2091 | end)) | |
2092 | end | |
2093 | ||
2094 | function groundwind(type,pos,scale,value,speed) | |
2095 | local type = type | |
2096 | local rng = Instance.new("Part", char) | |
2097 | rng.Anchored = true | |
2098 | rng.BrickColor = origcolor | |
2099 | rng.CanCollide = false | |
2100 | rng.FormFactor = 3 | |
2101 | rng.Name = "Ring" | |
2102 | rng.Size = Vector3.new(1, 1, 1) | |
2103 | rng.Transparency = 0 | |
2104 | rng.TopSurface = 0 | |
2105 | rng.BottomSurface = 0 | |
2106 | rng.CFrame = pos | |
2107 | local rngm = Instance.new("SpecialMesh", rng) | |
2108 | rngm.MeshId = "http://www.roblox.com/asset/?id=1051557" | |
2109 | rngm.Scale = scale | |
2110 | local scaler2 = 1 | |
2111 | if type == "Add" then | |
2112 | scaler2 = 1*value | |
2113 | elseif type == "Divide" then | |
2114 | scaler2 = 1/value | |
2115 | end | |
2116 | coroutine.resume(coroutine.create(function() | |
2117 | for i = 0,10,0.1 do | |
2118 | swait() | |
2119 | if type == "Add" then | |
2120 | scaler2 = scaler2 - 0.01*value | |
2121 | elseif type == "Divide" then | |
2122 | scaler2 = scaler2 - 0.01/value | |
2123 | end | |
2124 | rng.CFrame = rng.CFrame*CFrame.Angles(0,0.025*speed,0) | |
2125 | rng.Transparency = rng.Transparency + 0.01 | |
2126 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2/5, scaler2) | |
2127 | end | |
2128 | rng:Destroy() | |
2129 | end)) | |
2130 | end | |
2131 | ||
2132 | function sphere(type,pos,scale,value) | |
2133 | local type = type | |
2134 | local rng = Instance.new("Part", char) | |
2135 | rng.Anchored = true | |
2136 | rng.BrickColor = origcolor | |
2137 | rng.CanCollide = false | |
2138 | rng.FormFactor = 3 | |
2139 | rng.Name = "Ring" | |
2140 | rng.Material = "Neon" | |
2141 | rng.Size = Vector3.new(1, 1, 1) | |
2142 | rng.Transparency = 0 | |
2143 | rng.TopSurface = 0 | |
2144 | rng.BottomSurface = 0 | |
2145 | rng.CFrame = pos | |
2146 | local rngm = Instance.new("SpecialMesh", rng) | |
2147 | rngm.MeshType = "Sphere" | |
2148 | rngm.Scale = scale | |
2149 | local scaler2 = 1 | |
2150 | if type == "Add" then | |
2151 | scaler2 = 1*value | |
2152 | elseif type == "Divide" then | |
2153 | scaler2 = 1/value | |
2154 | end | |
2155 | coroutine.resume(coroutine.create(function() | |
2156 | for i = 0,10,0.1 do | |
2157 | swait() | |
2158 | if type == "Add" then | |
2159 | scaler2 = scaler2 - 0.01*value | |
2160 | elseif type == "Divide" then | |
2161 | scaler2 = scaler2 - 0.01/value | |
2162 | end | |
2163 | rng.Transparency = rng.Transparency + 0.01 | |
2164 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2) | |
2165 | end | |
2166 | rng:Destroy() | |
2167 | end)) | |
2168 | end | |
2169 | ||
2170 | function beam(type,pos,scale,value) | |
2171 | local type = type | |
2172 | local rng = Instance.new("Part", char) | |
2173 | rng.Anchored = true | |
2174 | rng.BrickColor = origcolor | |
2175 | rng.CanCollide = false | |
2176 | rng.FormFactor = 3 | |
2177 | rng.Name = "Ring" | |
2178 | rng.Material = "Neon" | |
2179 | rng.Size = Vector3.new(1, 1, 1) | |
2180 | rng.Transparency = 0 | |
2181 | rng.TopSurface = 0 | |
2182 | rng.BottomSurface = 0 | |
2183 | rng.CFrame = pos | |
2184 | local rngm = Instance.new("SpecialMesh", rng) | |
2185 | rngm.MeshType = "Sphere" | |
2186 | rngm.Scale = scale | |
2187 | rngm.Scale = rngm.Scale + Vector3.new(0,10000,0) | |
2188 | local scaler2 = 0.5 | |
2189 | if type == "Add" then | |
2190 | scaler2 = 0.5*value | |
2191 | elseif type == "Divide" then | |
2192 | scaler2 = 0.5/value | |
2193 | end | |
2194 | coroutine.resume(coroutine.create(function() | |
2195 | for i = 0,10,0.1 do | |
2196 | swait() | |
2197 | if type == "Add" then | |
2198 | scaler2 = scaler2 - 0.01*value | |
2199 | elseif type == "Divide" then | |
2200 | scaler2 = scaler2 - 0.01/value | |
2201 | end | |
2202 | rng.Transparency = rng.Transparency + 0.01 | |
2203 | rngm.Scale = rngm.Scale + Vector3.new(scaler2, scaler2, scaler2) | |
2204 | end | |
2205 | rng:Destroy() | |
2206 | end)) | |
2207 | end | |
2208 | local dashing = false | |
2209 | local OriginalWalkspeed = hum.WalkSpeed | |
2210 | local equipped = false | |
2211 | -- Functions are ready. | |
2212 | function equipanim() | |
2213 | attack = true | |
2214 | for i = 0,2,0.1 do | |
2215 | ||
2216 | swait() | |
2217 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.2) | |
2218 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-40)),.2) | |
2219 | RW.C0 = clerp(RW.C0, CFrame.new(1.75, 0.5, 0) * angles(math.rad(0), math.rad(-50), math.rad(100)), 0.2) | |
2220 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)), 0.2) | |
2221 | end | |
2222 | attack = false | |
2223 | hum.WalkSpeed = 10 | |
2224 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(0),math.rad(0),math.rad(0)),1) | |
2225 | wepweld.Part0 = rarm | |
2226 | equipped = true | |
2227 | end | |
2228 | function unequipanim() | |
2229 | attack = true | |
2230 | for i = 0,2,0.1 do | |
2231 | ||
2232 | swait() | |
2233 | wepweld.C1 = clerp(wepweld.C1,cf(0,-1,0)* angles(math.rad(220),math.rad(0),math.rad(0)),0.2) | |
2234 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.2) | |
2235 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-40)),.2) | |
2236 | RW.C0 = clerp(RW.C0, CFrame.new(1.75, 0.5, 0) * angles(math.rad(0), math.rad(-50), math.rad(100)), 0.2) | |
2237 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-10)), 0.2) | |
2238 | end | |
2239 | attack = false | |
2240 | hum.WalkSpeed = OriginalWalkspeed | |
2241 | wepweld.C1 = clerp(wepweld.C1,cf(1,0,-4)* angles(math.rad(20),math.rad(-90),math.rad(0)),1) | |
2242 | wepweld.Part0 = tors | |
2243 | equipped = false | |
2244 | end | |
2245 | ||
2246 | ----------- attacks | |
2247 | function attackone() | |
2248 | attack = true | |
2249 | for i = 0,3,0.1 do | |
2250 | ||
2251 | swait() | |
2252 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.1) | |
2253 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(40)),0.1) | |
2254 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-40)),.1) | |
2255 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(100), math.rad(100)), 0.1) | |
2256 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-100)), 0.1) | |
2257 | end | |
2258 | CFuncs["Sound"].Create("rbxassetid://231917961", hitbox, 1, 1) | |
2259 | local con = hitbox.Touched:connect(function(hit) | |
2260 | Damagefunc(hitbox, hit, math.huge, math.huge, 0, "Normal", RootPart, 0.3, "0", 0.8) | |
2261 | end) | |
2262 | for i = 0,3,0.1 do | |
2263 | ||
2264 | swait() | |
2265 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.2) | |
2266 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(-60)),0.2) | |
2267 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(60)),.2) | |
2268 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(40), math.rad(60)), 0.2) | |
2269 | LW.C0 = clerp(LW.C0, CFrame.new(-0.25, 0.5, -0.75) * angles(math.rad(40), math.rad(0), math.rad(50)), 0.2) | |
2270 | end | |
2271 | con:disconnect() | |
2272 | attack = false | |
2273 | end | |
2274 | ||
2275 | function attacktwo() | |
2276 | attack = true | |
2277 | for i = 0,3,0.1 do | |
2278 | ||
2279 | swait() | |
2280 | wepweld.C1 = clerp(wepweld.C1,cf(0,-1,0)* angles(math.rad(180),math.rad(0),math.rad(0)),0.1) | |
2281 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-40)),0.1) | |
2282 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(40)),.1) | |
2283 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(100), math.rad(70)), 0.1) | |
2284 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(80), math.rad(0), math.rad(40)), 0.1) | |
2285 | end | |
2286 | CFuncs["Sound"].Create("rbxassetid://231917950", hitbox, 1, 1) | |
2287 | local con = hitbox.Touched:connect(function(hit) | |
2288 | Damagefunc(hitbox, hit, math.huge, math.huge, 0, "Normal", RootPart, 0.3, "0", 0.8) | |
2289 | end) | |
2290 | for i = 0,3,0.1 do | |
2291 | ||
2292 | swait() | |
2293 | wepweld.C1 = clerp(wepweld.C1,cf(0,-1,0)* angles(math.rad(180),math.rad(0),math.rad(0)),0.2) | |
2294 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(80)),0.2) | |
2295 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-80)),.2) | |
2296 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, -0.75) * angles(math.rad(0), math.rad(130), math.rad(100)), 0.2) | |
2297 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(110), math.rad(0), math.rad(50)), 0.2) | |
2298 | end | |
2299 | con:disconnect() | |
2300 | attack = false | |
2301 | end | |
2302 | ||
2303 | function attackthree() | |
2304 | attack = true | |
2305 | for i = 0,3,0.1 do | |
2306 | ||
2307 | swait() | |
2308 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.5) | |
2309 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(20),math.rad(0),math.rad(-100)),0.1) | |
2310 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(100)),.1) | |
2311 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(40), math.rad(60)), 0.1) | |
2312 | LW.C0 = clerp(LW.C0, CFrame.new(-0.25, 0.5, -0.75) * angles(math.rad(40), math.rad(0), math.rad(50)), 0.1) | |
2313 | end | |
2314 | CFuncs["Sound"].Create("rbxassetid://231917950", hitbox, 1, 1.25) | |
2315 | local con = hitbox.Touched:connect(function(hit) | |
2316 | Damagefunc(hitbox, hit, math.huge, math.huge, 0, "Normal", RootPart, 0.3, "0", 0.8) | |
2317 | end) | |
2318 | for i = 0,3,0.1 do | |
2319 | ||
2320 | swait() | |
2321 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(20),math.rad(0),math.rad(0)),0.2) | |
2322 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(70)),0.2) | |
2323 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-70)),.2) | |
2324 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(80), math.rad(110)), 0.2) | |
2325 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, -0.75) * angles(math.rad(120), math.rad(0), math.rad(-5)), 0.2) | |
2326 | end | |
2327 | con:disconnect() | |
2328 | attack = false | |
2329 | end | |
2330 | ||
2331 | function attackfour() | |
2332 | attack = true | |
2333 | for i = 0,3,0.1 do | |
2334 | ||
2335 | swait() | |
2336 | wepweld.C1 = clerp(wepweld.C1,cf(1,1,0)* angles(math.rad(0),math.rad(0),math.rad(-40)),0.5) | |
2337 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-10),math.rad(0),math.rad(0)),0.1) | |
2338 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.1) | |
2339 | RW.C0 = clerp(RW.C0, CFrame.new(1.15, 1, 0) * angles(math.rad(190), math.rad(0), math.rad(-40)), 0.1) | |
2340 | LW.C0 = clerp(LW.C0, CFrame.new(-1.15, 1, 0) * angles(math.rad(190), math.rad(0), math.rad(40)), 0.1) | |
2341 | end | |
2342 | for i = 0,1,0.1 do | |
2343 | swait() | |
2344 | wepweld.C1 = clerp(wepweld.C1,cf(1,1,0)* angles(math.rad(60),math.rad(0),math.rad(-40)),0.4) | |
2345 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),0.4) | |
2346 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.4) | |
2347 | RW.C0 = clerp(RW.C0, CFrame.new(1.15, 0.25, -0.45) * angles(math.rad(60), math.rad(0), math.rad(-40)), 0.4) | |
2348 | LW.C0 = clerp(LW.C0, CFrame.new(-1.15, 0.25, -0.45) * angles(math.rad(60), math.rad(0), math.rad(40)), 0.4) | |
2349 | end | |
2350 | local impact = Instance.new("Part") | |
2351 | impact.Parent = char | |
2352 | impact.BrickColor = origcolor | |
2353 | impact.CanCollide = false | |
2354 | impact.Material = "Neon" | |
2355 | impact.Anchored = true | |
2356 | impact.TopSurface = 0 | |
2357 | impact.BottomSurface = 0 | |
2358 | impact.Transparency = 1 | |
2359 | impact.Size = vt(2,2,2) | |
2360 | impact.Position = bladt.Position | |
2361 | game:GetService("Debris"):AddItem(impact, 5) | |
2362 | CFuncs["Sound"].Create("rbxassetid://231917806", impact, 2, 1) | |
2363 | CFuncs["Sound"].Create("rbxassetid://231917845", impact, 1, 1) | |
2364 | CFuncs["Sound"].Create("rbxassetid://231917833", impact, 1, 1.5) | |
2365 | MagniDamage(impact, 10, 10,12, 0, "Normal") | |
2366 | ring2("Divide",impact.CFrame*CFrame.Angles(math.rad(90),0,0),Vector3.new(1,1,0),1.5,BrickColor.new("White")) | |
2367 | ring2("Divide",impact.CFrame*CFrame.Angles(math.rad(90),0,0),Vector3.new(5,5,0),2.5,BrickColor.new("White")) | |
2368 | wave2("Divide",impact.CFrame*CFrame.Angles(0,0,0),Vector3.new(5,0,5),5,BrickColor.new("White")) | |
2369 | for i = 0,1,0.1 do | |
2370 | swait() | |
2371 | CameraShake(10, 5) | |
2372 | wepweld.C1 = clerp(wepweld.C1,cf(1,1,0)* angles(math.rad(60),math.rad(0),math.rad(-40)),0.4) | |
2373 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),0.4) | |
2374 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.4) | |
2375 | RW.C0 = clerp(RW.C0, CFrame.new(1.15, 0.25, -0.45) * angles(math.rad(60), math.rad(0), math.rad(-40)), 0.4) | |
2376 | LW.C0 = clerp(LW.C0, CFrame.new(-1.15, 0.25, -0.45) * angles(math.rad(60), math.rad(0), math.rad(40)), 0.4) | |
2377 | end | |
2378 | attack = false | |
2379 | end | |
2380 | ||
2381 | -------- Skills | |
2382 | function scrollingup() | |
2383 | attack = true | |
2384 | for i = 0,3,0.1 do | |
2385 | ||
2386 | swait() | |
2387 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.5) | |
2388 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(110)),0.1) | |
2389 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(-100)),.1) | |
2390 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(70), math.rad(90)), 0.1) | |
2391 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(90), math.rad(0), math.rad(20)), 0.1) | |
2392 | end | |
2393 | local con = hitbox.Touched:connect(function(hit) | |
2394 | Damagefunc(hitbox, hit, math.huge, math.huge, 0, "Normal", RootPart, 0.3, "0", 0.8) | |
2395 | end) | |
2396 | local bv = Instance.new("BodyVelocity") | |
2397 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
2398 | bv.velocity = root.CFrame.lookVector*100 | |
2399 | bv.Parent = root | |
2400 | CFuncs["Sound"].Create("rbxassetid://231917788", root, 2.5, 1) | |
2401 | CFuncs["Sound"].Create("rbxassetid://231917845", root, 2.5, 1) | |
2402 | CFuncs["Sound"].Create("rbxassetid://231917801", root, 1, 1) | |
2403 | wave2("Divide",root.CFrame*CFrame.Angles(math.rad(90),0,0),Vector3.new(10,1,10),35,BrickColor.new("White")) | |
2404 | wave2("Divide",root.CFrame*CFrame.Angles(math.rad(90),0,0),Vector3.new(10,1,10),5,BrickColor.new("White")) | |
2405 | ring2("Divide",root.CFrame*CFrame.Angles(0,0,0),Vector3.new(1,1,1),1.5,BrickColor.new("White")) | |
2406 | ring2("Divide",root.CFrame*CFrame.Angles(0,0,0),Vector3.new(1,1,1),1,BrickColor.new("White")) | |
2407 | coroutine.resume(coroutine.create(function() | |
2408 | wait(0.45) | |
2409 | bv:Destroy() | |
2410 | end)) | |
2411 | for z = 0, 1 do | |
2412 | MagniDamage(root, 15, 13,15, 0, "Normal") | |
2413 | ring2("Divide",root.CFrame*CFrame.Angles(0,0,0),Vector3.new(1,1,1),5,BrickColor.new("White")) | |
2414 | ring2("Divide",root.CFrame*CFrame.Angles(math.rad(90),0,0),Vector3.new(15,15,1),25,BrickColor.new("Toothpaste")) | |
2415 | ring2("Divide",root.CFrame*CFrame.Angles(math.rad(90),0,0),Vector3.new(15,15,1),2.5,BrickColor.new("Toothpaste")) | |
2416 | for i = 0,1,0.3 do | |
2417 | CameraShake(6, 3) | |
2418 | swait() | |
2419 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(20),math.rad(-5),math.rad(0)),0.3) | |
2420 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(-30)),0.3) | |
2421 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(30)),.3) | |
2422 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(-10), math.rad(90)), 0.3) | |
2423 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-40)), 0.3) | |
2424 | end | |
2425 | for i = 0,1,0.3 do | |
2426 | ||
2427 | swait() | |
2428 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(20),math.rad(-5),math.rad(0)),0.3) | |
2429 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-90)),0.3) | |
2430 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(90)),.3) | |
2431 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(-10), math.rad(90)), 0.3) | |
2432 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-40)), 0.3) | |
2433 | end | |
2434 | for i = 0,1,0.3 do | |
2435 | ||
2436 | swait() | |
2437 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(20),math.rad(-5),math.rad(0)),0.3) | |
2438 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-180)),0.3) | |
2439 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(30)),.3) | |
2440 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(-10), math.rad(90)), 0.3) | |
2441 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-40)), 0.3) | |
2442 | end | |
2443 | for i = 0,1,0.3 do | |
2444 | ||
2445 | swait() | |
2446 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(20),math.rad(-5),math.rad(0)),0.3) | |
2447 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(0),math.rad(0),math.rad(-270)),0.3) | |
2448 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(30)),.3) | |
2449 | RW.C0 = clerp(RW.C0, CFrame.new(1.45, 0.5, 0) * angles(math.rad(0), math.rad(-10), math.rad(90)), 0.3) | |
2450 | LW.C0 = clerp(LW.C0, CFrame.new(-1.45, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-40)), 0.3) | |
2451 | end | |
2452 | end | |
2453 | attack = false | |
2454 | con:disconnect() | |
2455 | end | |
2456 | ||
2457 | function lemmesmashyoo() | |
2458 | attack = true | |
2459 | CFuncs["Sound"].Create("rbxassetid://136007472", root, 0.75, 1.15) | |
2460 | sphere("Divide",root.CFrame*CFrame.Angles(0,0,0),Vector3.new(-25,-25,-25),1.75) | |
2461 | for i = 0,5,0.1 do | |
2462 | ||
2463 | swait() | |
2464 | wepweld.C1 = clerp(wepweld.C1,cf(1,1,0)* angles(math.rad(0),math.rad(0),math.rad(-40)),0.5) | |
2465 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(-10),math.rad(0),math.rad(0)),0.1) | |
2466 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.1) | |
2467 | RW.C0 = clerp(RW.C0, CFrame.new(1.15, 1, 0) * angles(math.rad(190), math.rad(0), math.rad(-40)), 0.1) | |
2468 | LW.C0 = clerp(LW.C0, CFrame.new(-1.15, 1, 0) * angles(math.rad(190), math.rad(0), math.rad(40)), 0.1) | |
2469 | end | |
2470 | for i = 0,1,0.1 do | |
2471 | swait() | |
2472 | wepweld.C1 = clerp(wepweld.C1,cf(1,1,0)* angles(math.rad(60),math.rad(0),math.rad(-40)),0.4) | |
2473 | CameraShake(8, 4) | |
2474 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),0.4) | |
2475 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.4) | |
2476 | RW.C0 = clerp(RW.C0, CFrame.new(1.15, 0.25, -0.45) * angles(math.rad(60), math.rad(0), math.rad(-40)), 0.4) | |
2477 | LW.C0 = clerp(LW.C0, CFrame.new(-1.15, 0.25, -0.45) * angles(math.rad(60), math.rad(0), math.rad(40)), 0.4) | |
2478 | end | |
2479 | local impact = Instance.new("Part") | |
2480 | impact.Parent = char | |
2481 | impact.BrickColor = origcolor | |
2482 | impact.CanCollide = false | |
2483 | impact.Material = "Neon" | |
2484 | impact.Anchored = true | |
2485 | impact.TopSurface = 0 | |
2486 | impact.BottomSurface = 0 | |
2487 | impact.Transparency = 1 | |
2488 | impact.Size = vt(2,2,2) | |
2489 | impact.Position = bladt.Position | |
2490 | game:GetService("Debris"):AddItem(impact, 5) | |
2491 | CFuncs["Sound"].Create("rbxassetid://157878578", impact, 1.5, 0.75) | |
2492 | CFuncs["Sound"].Create("rbxassetid://157878578", impact, 0.5, 0.5) | |
2493 | CFuncs["Sound"].Create("rbxassetid://231917806", impact, 2.25, 0.5) | |
2494 | CFuncs["Sound"].Create("rbxassetid://231917845", impact, 2.25, 0.5) | |
2495 | CFuncs["Sound"].Create("rbxassetid://231917833", impact, 2.25, 1.25) | |
2496 | MagniDamage(impact, 27.5, 15,17, 0, "Normal") | |
2497 | ring2("Add",impact.CFrame*CFrame.Angles(math.rad(90),0,0),Vector3.new(1,1,0),1.25,BrickColor.new("White")) | |
2498 | ring2("Divide",impact.CFrame*CFrame.Angles(math.rad(90),0,0),Vector3.new(5,5,0),1.5,BrickColor.new("White")) | |
2499 | wave2("Divide",impact.CFrame*CFrame.Angles(0,0,0),Vector3.new(5,0,5),3.5,BrickColor.new("White")) | |
2500 | wave2("Divide",impact.CFrame*CFrame.Angles(0,0,0),Vector3.new(15,0,15),5,BrickColor.new("White")) | |
2501 | ring2("Add",impact.CFrame*CFrame.Angles(math.rad(90),0,0),Vector3.new(0,0,0),50,BrickColor.new("Really black")) | |
2502 | beam("Add",impact.CFrame*CFrame.Angles(0,0,0),Vector3.new(0,0,0),1) | |
2503 | beam("Add",impact.CFrame*CFrame.Angles(0,0,0),Vector3.new(0,0,0),1.25) | |
2504 | for i = 0,1,0.1 do | |
2505 | swait() | |
2506 | wepweld.C1 = clerp(wepweld.C1,cf(1,1,0)* angles(math.rad(60),math.rad(0),math.rad(-40)),0.4) | |
2507 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,0)* angles(math.rad(10),math.rad(0),math.rad(0)),0.4) | |
2508 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(10),math.rad(0),math.rad(0)),.4) | |
2509 | RW.C0 = clerp(RW.C0, CFrame.new(1.15, 0.25, -0.45) * angles(math.rad(60), math.rad(0), math.rad(-40)), 0.4) | |
2510 | LW.C0 = clerp(LW.C0, CFrame.new(-1.15, 0.25, -0.45) * angles(math.rad(60), math.rad(0), math.rad(40)), 0.4) | |
2511 | end | |
2512 | attack = false | |
2513 | end | |
2514 | --- | |
2515 | ||
2516 | local attacktype = 1 | |
2517 | mouse.Button1Down:connect(function() | |
2518 | if equipped == true then | |
2519 | if attack == false and attacktype == 1 then | |
2520 | attacktype = 2 | |
2521 | attackone() | |
2522 | elseif attack == false and attacktype == 2 then | |
2523 | attacktype = 3 | |
2524 | attacktwo() | |
2525 | elseif attack == false and attacktype == 3 then | |
2526 | attacktype = 4 | |
2527 | attackthree() | |
2528 | elseif attack == false and attacktype == 4 then | |
2529 | attacktype = 1 | |
2530 | attackfour() | |
2531 | end | |
2532 | end | |
2533 | end) | |
2534 | mouse.KeyDown:connect(function(k) | |
2535 | if k == "f" and attack == false and equipped == false then | |
2536 | equipanim() | |
2537 | elseif k == "f" and attack == false and equipped == true then | |
2538 | unequipanim() | |
2539 | end | |
2540 | if equipped == true then | |
2541 | if k == "z" and attack == false then | |
2542 | scrollingup() | |
2543 | end | |
2544 | if k == "x" and attack == false then | |
2545 | lemmesmashyoo() | |
2546 | end | |
2547 | end | |
2548 | end) | |
2549 | Humanoid.Animator.Parent = nil | |
2550 | idleanim=.4 | |
2551 | while true do | |
2552 | swait() | |
2553 | sine = sine + change | |
2554 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
2555 | local velderp=RootPart.Velocity.y | |
2556 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
2557 | if equipped==true or equipped==false then | |
2558 | if attack==false then | |
2559 | idle=idle+1 | |
2560 | else | |
2561 | idle=0 | |
2562 | end | |
2563 | if idle>=500 then | |
2564 | if attack==false then | |
2565 | end | |
2566 | end | |
2567 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
2568 | Anim="Jump" | |
2569 | if attack==false then | |
2570 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1) | |
2571 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1) | |
2572 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 25))*angles(math.rad(-10),math.rad(0),math.rad(0)),.1) | |
2573 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-2.5),math.rad(0),math.rad(0)),.1) | |
2574 | RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-5),math.rad(0),math.rad(25)),.1) | |
2575 | LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-5),math.rad(0),math.rad(-25)),.1) | |
2576 | if equipped == true then | |
2577 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(-10),math.rad(180),math.rad(0)),0.1) | |
2578 | end | |
2579 | end | |
2580 | elseif RootPart.Velocity.y < -1 and hitfloor==nil then | |
2581 | Anim="Fall" | |
2582 | if attack==false then | |
2583 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(-20)),.1) | |
2584 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 25),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-5),math.rad(0),math.rad(20)),.1) | |
2585 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 25))*angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2586 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(0),math.rad(0),math.rad(0)),.1) | |
2587 | RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-20),math.rad(0),math.rad(50)),.1) | |
2588 | LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 25),0)*angles(math.rad(-20),math.rad(0),math.rad(-50)),.1) | |
2589 | if equipped == true then | |
2590 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(-10),math.rad(180),math.rad(0)),0.1) | |
2591 | end | |
2592 | end | |
2593 | elseif torvel<1 and hitfloor~=nil then | |
2594 | Anim="Idle" | |
2595 | if equipped == false then | |
2596 | if dashing == false then | |
2597 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 100),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-15)),.1) | |
2598 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 100),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(10)),.1) | |
2599 | end | |
2600 | if attack==false then | |
2601 | wepweld.C1 = clerp(wepweld.C1,cf(1,0,-4)* angles(math.rad(20),math.rad(-90),math.rad(0)),0.1) | |
2602 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 100))*angles(math.rad(-10),math.rad(0),math.rad(20 + 2.5 * math.cos(sine / 100))),.1) | |
2603 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(15 - 2.5 * math.cos(sine / 100)),math.rad(-10),math.rad(-20 - 2.5 * math.cos(sine / 100))),.1) | |
2604 | RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 100),0)*angles(math.rad(2.5),math.rad(0),math.rad(20 + 5 * math.cos(sine / 100))),.1) | |
2605 | LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 100),0)*angles(math.rad(-25),math.rad(0),math.rad(-15 + 1.5 * math.cos(sine / 100))),.1) | |
2606 | end | |
2607 | elseif equipped == true then | |
2608 | if dashing == false then | |
2609 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 100),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-15)),.1) | |
2610 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 100),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(-2.5),math.rad(0),math.rad(-10)),.1) | |
2611 | end | |
2612 | if attack==false then | |
2613 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(0),math.rad(0),math.rad(0)),0.1) | |
2614 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 100))*angles(math.rad(10),math.rad(0),math.rad(-20 + 2.5 * math.cos(sine / 100))),.1) | |
2615 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5 - 2.5 * math.cos(sine / 100)),math.rad(0),math.rad(20 - 2.5 * math.cos(sine / 100))),.1) | |
2616 | RW.C0=clerp(RW.C0,cf(1.45,0.5 + 0.1 * math.cos(sine / 100),0)*angles(math.rad(2.5),math.rad(75),math.rad(40 + 5 * math.cos(sine / 100))),.1) | |
2617 | LW.C0=clerp(LW.C0,cf(-1.45,0.5 + 0.1 * math.cos(sine / 100),0)*angles(math.rad(60),math.rad(0),math.rad(20 + 1.5 * math.cos(sine / 100))),.1) | |
2618 | end | |
2619 | end | |
2620 | elseif torvel>2 and torvel<22 and hitfloor~=nil then | |
2621 | Anim="Walk" | |
2622 | if equipped == false then | |
2623 | if dashing == false then | |
2624 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 4),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 35 * math.cos(sine / 6))),.1) | |
2625 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 4),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 35 * math.cos(sine / 6))),.1) | |
2626 | end | |
2627 | if attack==false then | |
2628 | wepweld.C1 = clerp(wepweld.C1,cf(1,0,-4)* angles(math.rad(20),math.rad(-90),math.rad(0)),0.1) | |
2629 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 32))*angles(math.rad(5),math.rad(0),math.rad(0)),.1) | |
2630 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(5),math.rad(0),math.rad(0)),.1) | |
2631 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-10),math.rad(0),math.rad(10)),.1) | |
2632 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-10),math.rad(0),math.rad(-10)),.1) | |
2633 | end | |
2634 | elseif equipped == true then | |
2635 | if dashing == false then | |
2636 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 4),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 35 * math.cos(sine / 12))),.1) | |
2637 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 4),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 35 * math.cos(sine / 12))),.1) | |
2638 | end | |
2639 | if attack==false then | |
2640 | wepweld.C1 = clerp(wepweld.C1,cf(0,1,0)* angles(math.rad(20),math.rad(180),math.rad(0)),0.1) | |
2641 | RootJoint.C0=clerp(RootJoint.C0,RootCF*cf(0,0,0 + 0.05 * math.cos(sine / 32))*angles(math.rad(5),math.rad(0),math.rad(0)),.1) | |
2642 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(5),math.rad(0),math.rad(0)),.1) | |
2643 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-10),math.rad(20),math.rad(10)),.1) | |
2644 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-10),math.rad(0),math.rad(-10)),.1) | |
2645 | end | |
2646 | end | |
2647 | elseif torvel>=22 and hitfloor~=nil then | |
2648 | Anim="Run" | |
2649 | if dashing == false then | |
2650 | RH.C0=clerp(RH.C0,cf(1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3) | |
2651 | LH.C0=clerp(LH.C0,cf(-1,-1 - 0.05 * math.cos(sine / 32),0)*angles(math.rad(0),math.rad(-90),math.rad(0))*angles(math.rad(0),math.rad(0),math.rad(0 + 75 * math.cos(sine / 3))),.3) | |
2652 | end | |
2653 | if attack==false then | |
2654 | RootJoint.C0 = clerp(RootJoint.C0,RootCF*cf(0,0,-0.25 + 0.05 * math.cos(sine / 32))* angles(math.rad(35),math.rad(0),math.rad(0)),.3) | |
2655 | Torso.Neck.C0=clerp(Torso.Neck.C0,necko*angles(math.rad(-5),math.rad(0),math.rad(0)),.3) | |
2656 | RW.C0=clerp(RW.C0,cf(1.5,0.5,0)*angles(math.rad(-50),math.rad(-60),math.rad(25)),.3) | |
2657 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0)*angles(math.rad(-50),math.rad(0),math.rad(-25)),.3) | |
2658 | end | |
2659 | end | |
2660 | end | |
2661 | end |