SHOW:
|
|
- or go back to the newest paste.
1 | - | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end |
1 | + | |
2 | - | local Player,game,owner = owner,game |
2 | + | |
3 | - | local RealPlayer = Player |
3 | + | |
4 | - | do |
4 | + | |
5 | - | local RealPlayer = RealPlayer |
5 | + | |
6 | - | script.Parent = RealPlayer.Character |
6 | + | |
7 | local sqrt = math.sqrt | |
8 | - | --Fake event to make stuff like Mouse.KeyDown work |
8 | + | |
9 | - | local Disconnect_Function = function(this) |
9 | + | |
10 | - | this[1].Functions[this[2]] = nil |
10 | + | |
11 | local function toAxisAngle(CFr) | |
12 | - | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}} |
12 | + | |
13 | - | local FakeEvent_Metatable = {__index={ |
13 | + | |
14 | - | Connect = function(this,f) |
14 | + | |
15 | - | local i = tostring(math.random(0,10000)) |
15 | + | |
16 | - | while this.Functions[i] do |
16 | + | |
17 | - | i = tostring(math.random(0,10000)) |
17 | + | |
18 | local C = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2 | |
19 | - | this.Functions[i] = f |
19 | + | |
20 | - | return setmetatable({this,i},Disconnect_Metatable) |
20 | + | |
21 | local y = (R02-R20)/sqrt(B) | |
22 | - | }} |
22 | + | |
23 | - | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect |
23 | + | |
24 | - | local function fakeEvent() |
24 | + | |
25 | - | return setmetatable({Functions={}},FakeEvent_Metatable) |
25 | + | |
26 | function ApplyTrig(Num,Func) | |
27 | local Min,Max = Func(0),Func(1) | |
28 | - | --Creating fake input objects with fake variables |
28 | + | |
29 | - | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()} |
29 | + | |
30 | - | FakeMouse.keyUp = FakeMouse.KeyUp |
30 | + | |
31 | - | FakeMouse.keyDown = FakeMouse.KeyDown |
31 | + | |
32 | - | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()} |
32 | + | |
33 | - | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...) |
33 | + | |
34 | - | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil |
34 | + | |
35 | - | end} |
35 | + | |
36 | - | --Merged 2 functions into one by checking amount of arguments |
36 | + | |
37 | - | CAS.UnbindAction = CAS.BindAction |
37 | + | |
38 | local Vec,Ang = toAxisAngle(CFrame1:inverse()*CFrame2) | |
39 | - | --This function will trigger the events that have been :Connect()'ed |
39 | + | |
40 | - | local function TriggerEvent(self,ev,...) |
40 | + | |
41 | - | for _,f in pairs(self[ev].Functions) do |
41 | + | |
42 | - | f(...) |
42 | + | |
43 | Spawn(function() | |
44 | local Ray = Ray.new(Torso.Position,Vector3.new(0,-1,0)*10) | |
45 | - | FakeMouse.TriggerEvent = TriggerEvent |
45 | + | |
46 | - | UIS.TriggerEvent = TriggerEvent |
46 | + | |
47 | if v.Character ~= nil then | |
48 | - | --Client communication |
48 | + | |
49 | - | local Event = Instance.new("RemoteEvent") |
49 | + | |
50 | - | Event.Name = "UserInput_Event" |
50 | + | |
51 | - | Event.OnServerEvent:Connect(function(plr,io) |
51 | + | |
52 | - | if plr~=RealPlayer then return end |
52 | + | |
53 | - | FakeMouse.Target = io.Target |
53 | + | |
54 | - | FakeMouse.Hit = io.Hit |
54 | + | |
55 | - | if not io.isMouse then |
55 | + | |
56 | - | local b = io.UserInputState == Enum.UserInputState.Begin |
56 | + | |
57 | - | if io.UserInputType == Enum.UserInputType.MouseButton1 then |
57 | + | |
58 | - | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") |
58 | + | |
59 | P.Material = "Neon" | |
60 | - | if io.UserInputType == Enum.UserInputType.MouseButton2 then |
60 | + | |
61 | - | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") |
61 | + | |
62 | P.CanCollide = false | |
63 | - | for _,t in pairs(CAS.Actions) do |
63 | + | |
64 | - | for _,k in pairs(t.Keys) do |
64 | + | |
65 | - | if k==io.KeyCode then |
65 | + | |
66 | - | t.Function(t.Name,io.UserInputState,io) |
66 | + | |
67 | - | end |
67 | + | |
68 | - | end |
68 | + | |
69 | P.FormFactor = "Custom" | |
70 | - | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) |
70 | + | |
71 | - | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) |
71 | + | |
72 | - | end |
72 | + | |
73 | - | end) |
73 | + | |
74 | - | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event") |
74 | + | |
75 | - | local Mouse = owner:GetMouse() |
75 | + | |
76 | - | local UIS = game:GetService("UserInputService") |
76 | + | |
77 | - | local input = function(io,RobloxHandled) |
77 | + | |
78 | - | if RobloxHandled then return end |
78 | + | |
79 | - | --Since InputObject is a client-side instance, we create and pass table instead |
79 | + | |
80 | - | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target}) |
80 | + | |
81 | for i2,v in pairs(Parts) do | |
82 | - | UIS.InputBegan:Connect(input) |
82 | + | |
83 | - | UIS.InputEnded:Connect(input) |
83 | + | |
84 | wait(0.02) | |
85 | - | local h,t |
85 | + | |
86 | - | --Give the server mouse data every second frame, but only if the values changed |
86 | + | |
87 | - | --If player is not moving their mouse, client won't fire events |
87 | + | |
88 | - | local HB = game:GetService("RunService").Heartbeat |
88 | + | |
89 | - | while true do |
89 | + | |
90 | - | if h~=Mouse.Hit or t~=Mouse.Target then |
90 | + | |
91 | - | h,t=Mouse.Hit,Mouse.Target |
91 | + | |
92 | - | Event:FireServer({isMouse=true,Target=t,Hit=h}) |
92 | + | |
93 | for i2,v in pairs(Parts) do | |
94 | - | --Wait 2 frames |
94 | + | |
95 | - | for i=1,2 do |
95 | + | |
96 | - | HB:Wait() |
96 | + | |
97 | elseif i >= 0.25 then | |
98 | - | end]==],script) |
98 | + | |
99 | end | |
100 | - | ----Sandboxed game object that allows the usage of client-side methods and services |
100 | + | |
101 | - | --Real game object |
101 | + | |
102 | - | local RealGame = game |
102 | + | |
103 | Parts = nil | |
104 | - | --Metatable for fake service |
104 | + | |
105 | - | local FakeService_Metatable = { |
105 | + | |
106 | - | __index = function(self,k) |
106 | + | |
107 | - | local s = rawget(self,"_RealService") |
107 | + | |
108 | - | if s then |
108 | + | |
109 | - | return typeof(s[k])=="function" |
109 | + | |
110 | - | and function(_,...)return s[k](s,...)end or s[k] |
110 | + | |
111 | local LeftArm = Character["Left Arm"] | |
112 | - | end, |
112 | + | |
113 | - | __newindex = function(self,k,v) |
113 | + | |
114 | - | local s = rawget(self,"_RealService") |
114 | + | |
115 | - | if s then s[k]=v end |
115 | + | |
116 | local Torso = Character.Torso | |
117 | - | } |
117 | + | |
118 | - | local function FakeService(t,RealService) |
118 | + | |
119 | - | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService |
119 | + | |
120 | - | return setmetatable(t,FakeService_Metatable) |
120 | + | |
121 | local Anim = "Idle" | |
122 | local attacktype = 1 | |
123 | - | --Fake game object |
123 | + | |
124 | - | local FakeGame = { |
124 | + | |
125 | - | GetService = function(self,s) |
125 | + | |
126 | - | return rawget(self,s) or RealGame:GetService(s) |
126 | + | |
127 | - | end, |
127 | + | |
128 | - | Players = FakeService({ |
128 | + | |
129 | - | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player) |
129 | + | |
130 | - | },"Players"), |
130 | + | |
131 | - | UserInputService = FakeService(UIS,"UserInputService"), |
131 | + | |
132 | - | ContextActionService = FakeService(CAS,"ContextActionService"), |
132 | + | |
133 | - | RunService = FakeService({ |
133 | + | |
134 | - | _btrs = {}, |
134 | + | |
135 | - | RenderStepped = RealGame:GetService("RunService").Heartbeat, |
135 | + | |
136 | - | BindToRenderStep = function(self,name,_,fun) |
136 | + | |
137 | - | self._btrs[name] = self.Heartbeat:Connect(fun) |
137 | + | |
138 | - | end, |
138 | + | |
139 | - | UnbindFromRenderStep = function(self,name) |
139 | + | |
140 | - | self._btrs[name]:Disconnect() |
140 | + | |
141 | - | end, |
141 | + | |
142 | - | },"RunService") |
142 | + | |
143 | - | } |
143 | + | |
144 | - | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) |
144 | + | |
145 | - | FakeGame.service = FakeGame.GetService |
145 | + | |
146 | - | FakeService(FakeGame,game) |
146 | + | |
147 | - | --Changing owner to fake player object to support owner:GetMouse() |
147 | + | |
148 | - | game,owner = FakeGame,FakeGame.Players.LocalPlayer |
148 | + | |
149 | s.Volume = 10 | |
150 | s:Play() | |
151 | ||
152 | local pa = Instance.new("Shirt",Character) | |
153 | pa.ShirtTemplate = "http://www.roblox.com/asset/?id=9860730" | |
154 | local pe = Instance.new("Pants",Character) | |
155 | pe.PantsTemplate = "http://www.roblox.com/asset/?id=9860757" | |
156 | ||
157 | eye2 = Instance.new("Part", Character) | |
158 | eye2.Anchored = false | |
159 | eye2.Parent = Head | |
160 | eye2.TopSurface = 0 | |
161 | eye2.BrickColor = BrickColor.new("Royal purple") | |
162 | eye2.Material = "Neon" | |
163 | eye2.BottomSurface = 0 | |
164 | eye2m = Instance.new("SpecialMesh", eye2) | |
165 | eye2m.MeshId = "http://www.roblox.com/asset/?id=16952952" | |
166 | eye2m.TextureId = "http://www.roblox.com/asset/?id=30235452" | |
167 | eye2m.Scale = Vector3.new(0.9,0.9,0.9) | |
168 | ogsize = eye2m.Scale | |
169 | weld = Instance.new("Weld", Head) | |
170 | weld.Part0 = eye2 | |
171 | weld.Part1 = Head | |
172 | weld.Name = "eye2Weld" | |
173 | weld.C1 = CFrame.new(0,0.1,0) | |
174 | ||
175 | v=Instance.new("Part") | |
176 | v.Name = "ColorBrick" | |
177 | v.Parent=Character | |
178 | v.FormFactor="Symmetric" | |
179 | v.Anchored=true | |
180 | v.CanCollide=false | |
181 | v.BottomSurface="Smooth" | |
182 | v.TopSurface="Smooth" | |
183 | v.Size=Vector3.new(10,5,3) | |
184 | v.Transparency=1 | |
185 | v.CFrame=Character.Torso.CFrame | |
186 | v.BrickColor=BrickColor.new(CV) | |
187 | v.Transparency=1 | |
188 | v.Shape="Block" | |
189 | Humanoid.MaxHealth = 999e999 | |
190 | local m = Create("Model")({ | |
191 | Parent = Character, | |
192 | Name = "WeaponModel" | |
193 | }) | |
194 | Humanoid.Animator.Parent = nil | |
195 | Character.Animate.Parent = nil | |
196 | local function newMotor(part0, part1, c0, c1) | |
197 | local w = Create("Motor")({ | |
198 | Parent = part0, | |
199 | Part0 = part0, | |
200 | Part1 = part1, | |
201 | C0 = c0, | |
202 | C1 = c1 | |
203 | }) | |
204 | return w | |
205 | end | |
206 | function clerp(a, b, t) | |
207 | return a:lerp(b, t) | |
208 | end | |
209 | RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
210 | NeckCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0) | |
211 | local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0)) | |
212 | local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0)) | |
213 | local RH = newMotor(Torso, RightLeg, CFrame.new(0.5, -2, 0), CFrame.new(0, 0, 0)) | |
214 | local LH = newMotor(Torso, LeftLeg, CFrame.new(-0.5, -2, 0), CFrame.new(0, 0, 0)) | |
215 | RootJoint.C1 = CFrame.new(0, 0, 0) | |
216 | RootJoint.C0 = CFrame.new(0, 0, 0) | |
217 | Torso.Neck.C1 = CFrame.new(0, 0, 0) | |
218 | Torso.Neck.C0 = CFrame.new(0, 1.5, 0) | |
219 | local rarmc1 = RW.C1 | |
220 | local larmc1 = LW.C1 | |
221 | local rlegc1 = RH.C1 | |
222 | local llegc1 = LH.C1 | |
223 | local resetc1 = false | |
224 | function PlayAnimationFromTable(table, speed, bool) | |
225 | RootJoint.C0 = clerp(RootJoint.C0, table[1], speed) | |
226 | Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed) | |
227 | RW.C0 = clerp(RW.C0, table[3], speed) | |
228 | LW.C0 = clerp(LW.C0, table[4], speed) | |
229 | RH.C0 = clerp(RH.C0, table[5], speed) | |
230 | LH.C0 = clerp(LH.C0, table[6], speed) | |
231 | if bool == true and resetc1 == false then | |
232 | resetc1 = true | |
233 | RootJoint.C1 = RootJoint.C1 | |
234 | Torso.Neck.C1 = Torso.Neck.C1 | |
235 | RW.C1 = rarmc1 | |
236 | LW.C1 = larmc1 | |
237 | RH.C1 = rlegc1 | |
238 | LH.C1 = llegc1 | |
239 | end | |
240 | end | |
241 | ArtificialHB = Create("BindableEvent", script)({Parent = script, Name = "Heartbeat"}) | |
242 | script:WaitForChild("Heartbeat") | |
243 | frame = 0.03333333333333333 | |
244 | tf = 0 | |
245 | allowframeloss = false | |
246 | tossremainder = false | |
247 | lastframe = tick() | |
248 | script.Heartbeat:Fire() | |
249 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
250 | tf = tf + s | |
251 | if tf >= frame then | |
252 | if allowframeloss then | |
253 | script.Heartbeat:Fire() | |
254 | lastframe = tick() | |
255 | else | |
256 | for i = 1, math.floor(tf / frame) do | |
257 | script.Heartbeat:Fire() | |
258 | end | |
259 | lastframe = tick() | |
260 | end | |
261 | if tossremainder then | |
262 | tf = 0 | |
263 | else | |
264 | tf = tf - frame * math.floor(tf / frame) | |
265 | end | |
266 | end | |
267 | end) | |
268 | function swait(num) | |
269 | if num == 0 or num == nil then | |
270 | ArtificialHB.Event:wait() | |
271 | else | |
272 | for i = 0, num do | |
273 | ArtificialHB.Event:wait() | |
274 | end | |
275 | end | |
276 | end | |
277 | function RemoveOutlines(part) | |
278 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
279 | end | |
280 | CFuncs = { | |
281 | Part = { | |
282 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
283 | local Part = Create("Part")({ | |
284 | Parent = Parent, | |
285 | Reflectance = Reflectance, | |
286 | Transparency = Transparency, | |
287 | CanCollide = false, | |
288 | Locked = true, | |
289 | BrickColor = BrickColor.new(tostring(BColor)), | |
290 | Name = Name, | |
291 | Size = Size, | |
292 | Material = Material | |
293 | }) | |
294 | RemoveOutlines(Part) | |
295 | return Part | |
296 | end | |
297 | }, | |
298 | Mesh = { | |
299 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
300 | local Msh = Create(Mesh)({ | |
301 | Parent = Part, | |
302 | Offset = OffSet, | |
303 | Scale = Scale | |
304 | }) | |
305 | if Mesh == "SpecialMesh" then | |
306 | Msh.MeshType = MeshType | |
307 | Msh.MeshId = MeshId | |
308 | end | |
309 | return Msh | |
310 | end | |
311 | }, | |
312 | Weld = { | |
313 | Create = function(Parent, Part0, Part1, C0, C1) | |
314 | local Weld = Create("Weld")({ | |
315 | Parent = Parent, | |
316 | Part0 = Part0, | |
317 | Part1 = Part1, | |
318 | C0 = C0, | |
319 | C1 = C1 | |
320 | }) | |
321 | return Weld | |
322 | end | |
323 | }, | |
324 | Sound = { | |
325 | Create = function(id, par, vol, pit) | |
326 | coroutine.resume(coroutine.create(function() | |
327 | local Sound = Create("Sound")({ | |
328 | Volume = vol, | |
329 | Pitch = pit or 1, | |
330 | SoundId = "rbxassetid://" .. id, | |
331 | Parent = par or workspace | |
332 | }) | |
333 | Sound:play() | |
334 | game:GetService("Debris"):AddItem(Sound, 10) | |
335 | end)) | |
336 | end | |
337 | }, | |
338 | Decal = { | |
339 | Create = function(Color, Texture, Transparency, Name, Parent) | |
340 | local Decal = Create("Decal")({ | |
341 | Color3 = Color, | |
342 | Texture = "rbxassetid://" .. Texture, | |
343 | Transparency = Transparency, | |
344 | Name = Name, | |
345 | Parent = Parent | |
346 | }) | |
347 | return Decal | |
348 | end | |
349 | }, | |
350 | BillboardGui = { | |
351 | Create = function(Parent, Image, Position, Size) | |
352 | local BillPar = CFuncs.Part.Create(Parent, "SmoothPlastic", 0, 1, BrickColor.new("Black"), "BillboardGuiPart", Vector3.new(1, 1, 1)) | |
353 | BillPar.CFrame = CFrame.new(Position) | |
354 | local Bill = Create("BillboardGui")({ | |
355 | Parent = BillPar, | |
356 | Adornee = BillPar, | |
357 | Size = UDim2.new(1, 0, 1, 0), | |
358 | SizeOffset = Vector2.new(Size, Size) | |
359 | }) | |
360 | local d = Create("ImageLabel", Bill)({ | |
361 | Parent = Bill, | |
362 | BackgroundTransparency = 1, | |
363 | Size = UDim2.new(1, 0, 1, 0), | |
364 | Image = "rbxassetid://" .. Image | |
365 | }) | |
366 | return BillPar | |
367 | end | |
368 | }, | |
369 | ParticleEmitter = { | |
370 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
371 | local Particle = Create("ParticleEmitter")({ | |
372 | Parent = Parent, | |
373 | Color = ColorSequence.new(Color1, Color2), | |
374 | LightEmission = LightEmission, | |
375 | Size = Size, | |
376 | Texture = Texture, | |
377 | Transparency = Transparency, | |
378 | ZOffset = ZOffset, | |
379 | Acceleration = Accel, | |
380 | Drag = Drag, | |
381 | LockedToPart = LockedToPart, | |
382 | VelocityInheritance = VelocityInheritance, | |
383 | EmissionDirection = EmissionDirection, | |
384 | Enabled = Enabled, | |
385 | Lifetime = LifeTime, | |
386 | Rate = Rate, | |
387 | Rotation = Rotation, | |
388 | RotSpeed = RotSpeed, | |
389 | Speed = Speed, | |
390 | VelocitySpread = VelocitySpread | |
391 | }) | |
392 | return Particle | |
393 | end | |
394 | }, | |
395 | CreateTemplate = {} | |
396 | } | |
397 | function rayCast(Position, Direction, Range, Ignore) | |
398 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore) | |
399 | end | |
400 | function findNearestTorso(pos) | |
401 | local list = game.Workspace:children() | |
402 | local torso | |
403 | local dist = 1000 | |
404 | local temp, human, temp2 | |
405 | for x = 1, #list do | |
406 | temp2 = list[x] | |
407 | if temp2.className == "Model" and temp2.Name ~= Character.Name then | |
408 | temp = temp2:findFirstChild("Torso") | |
409 | human = temp2:findFirstChild("Humanoid") | |
410 | if temp ~= nil and human ~= nil and human.Health > 0 and dist > (temp.Position - pos).magnitude then | |
411 | torso = temp | |
412 | dist = (temp.Position - pos).magnitude | |
413 | end | |
414 | end | |
415 | end | |
416 | return torso, dist | |
417 | end | |
418 | function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
419 | if hit.Parent == nil then | |
420 | return | |
421 | end | |
422 | local h = hit.Parent:FindFirstChild("Humanoid") | |
423 | for _, v in pairs(hit.Parent:children()) do | |
424 | if v:IsA("Humanoid") then | |
425 | h = v | |
426 | end | |
427 | end | |
428 | if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
429 | if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then | |
430 | return | |
431 | end | |
432 | local c = Create("ObjectValue")({ | |
433 | Name = "creator", | |
434 | Value = game:service("Players").LocalPlayer, | |
435 | Parent = h | |
436 | }) | |
437 | game:GetService("Debris"):AddItem(c, 0.5) | |
438 | if HitSound ~= nil and HitPitch ~= nil then | |
439 | CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) | |
440 | end | |
441 | local blocked = false | |
442 | local block = hit.Parent:findFirstChild("Block") | |
443 | if block ~= nil and block.className == "IntValue" and block.Value > 0 then | |
444 | blocked = true | |
445 | block.Value = block.Value - 1 | |
446 | print(block.Value) | |
447 | end | |
448 | if blocked == false then | |
449 | h.Health = 0 | |
450 | else | |
451 | h.Health = h.Health - Damage / 2 | |
452 | end | |
453 | if Type == "Knockdown" then | |
454 | local hum = hit.Parent.Humanoid | |
455 | hum.PlatformStand = true | |
456 | coroutine.resume(coroutine.create(function(HHumanoid) | |
457 | swait(1) | |
458 | HHumanoid.PlatformStand = false | |
459 | end), hum) | |
460 | local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit | |
461 | local bodvol = Create("BodyVelocity")({ | |
462 | velocity = angle * knockback, | |
463 | P = 5000, | |
464 | maxForce = Vector3.new(8000, 8000, 8000), | |
465 | Parent = hit | |
466 | }) | |
467 | local rl = Create("BodyAngularVelocity")({ | |
468 | P = 3000, | |
469 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
470 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
471 | Parent = hit | |
472 | }) | |
473 | game:GetService("Debris"):AddItem(bodvol, 0.5) | |
474 | game:GetService("Debris"):AddItem(rl, 0.5) | |
475 | elseif Type == "Normal" then | |
476 | local vp = Create("BodyVelocity")({ | |
477 | P = 500, | |
478 | maxForce = Vector3.new(math.huge, 0, math.huge), | |
479 | velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05 | |
480 | }) | |
481 | game:GetService("Debris"):AddItem(vp, 0.5) | |
482 | elseif Type == "Up" then | |
483 | local bodyVelocity = Create("BodyVelocity")({ | |
484 | velocity = Vector3.new(0, 20, 0), | |
485 | P = 5000, | |
486 | maxForce = Vector3.new(8000, 8000, 8000), | |
487 | Parent = hit | |
488 | }) | |
489 | game:GetService("Debris"):AddItem(bodyVelocity, 0.5) | |
490 | elseif Type == "DarkUp" then | |
491 | coroutine.resume(coroutine.create(function() | |
492 | for i = 0, 1, 0.1 do | |
493 | swait() | |
494 | Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, 0.08, 1) | |
495 | end | |
496 | end)) | |
497 | local bodyVelocity = Create("BodyVelocity")({ | |
498 | velocity = Vector3.new(0, 20, 0), | |
499 | P = 5000, | |
500 | maxForce = Vector3.new(8000, 8000, 8000), | |
501 | Parent = hit | |
502 | }) | |
503 | game:GetService("Debris"):AddItem(bodyVelocity, 1) | |
504 | elseif Type == "Snare" then | |
505 | local bp = Create("BodyPosition")({ | |
506 | P = 2000, | |
507 | D = 100, | |
508 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
509 | position = hit.Parent.Torso.Position, | |
510 | Parent = hit.Parent.Torso | |
511 | }) | |
512 | game:GetService("Debris"):AddItem(bp, 1) | |
513 | elseif Type == "Freeze" then | |
514 | local BodPos = Create("BodyPosition")({ | |
515 | P = 50000, | |
516 | D = 1000, | |
517 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
518 | position = hit.Parent.Torso.Position, | |
519 | Parent = hit.Parent.Torso | |
520 | }) | |
521 | local BodGy = Create("BodyGyro")({ | |
522 | maxTorque = Vector3.new(400000, 400000, 400000) * math.huge, | |
523 | P = 20000, | |
524 | Parent = hit.Parent.Torso, | |
525 | cframe = hit.Parent.Torso.CFrame | |
526 | }) | |
527 | hit.Parent.Torso.Anchored = true | |
528 | coroutine.resume(coroutine.create(function(Part) | |
529 | swait(1.5) | |
530 | Part.Anchored = false | |
531 | end), hit.Parent.Torso) | |
532 | game:GetService("Debris"):AddItem(BodPos, 3) | |
533 | game:GetService("Debris"):AddItem(BodGy, 3) | |
534 | end | |
535 | local debounce = Create("BoolValue")({ | |
536 | Name = "DebounceHit", | |
537 | Parent = hit.Parent, | |
538 | Value = true | |
539 | }) | |
540 | game:GetService("Debris"):AddItem(debounce, Delay) | |
541 | c = Create("ObjectValue")({ | |
542 | Name = "creator", | |
543 | Value = Player, | |
544 | Parent = h | |
545 | }) | |
546 | game:GetService("Debris"):AddItem(c, 0.5) | |
547 | end | |
548 | end | |
549 | function ShowDamage(Pos, Text, Time, Color) | |
550 | local Rate = 0.03333333333333333 | |
551 | local Pos = Pos or Vector3.new(0, 0, 0) | |
552 | local Text = Text or "" | |
553 | local Time = Time or 2 | |
554 | local Color = Color or Color3.new(1, 0, 1) | |
555 | local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
556 | EffectPart.Anchored = true | |
557 | local BillboardGui = Create("BillboardGui")({ | |
558 | Size = UDim2.new(3, 0, 3, 0), | |
559 | Adornee = EffectPart, | |
560 | Parent = EffectPart | |
561 | }) | |
562 | local TextLabel = Create("TextLabel")({ | |
563 | BackgroundTransparency = 1, | |
564 | Size = UDim2.new(1, 0, 1, 0), | |
565 | Text = Text, | |
566 | Font = "SciFi", | |
567 | TextColor3 = Color, | |
568 | TextScaled = true, | |
569 | BorderColor3 = Color3.new(0,0,0), | |
570 | Parent = BillboardGui | |
571 | }) | |
572 | game.Debris:AddItem(EffectPart, Time) | |
573 | EffectPart.Parent = game:GetService("Workspace") | |
574 | delay(0, function() | |
575 | local Frames = Time / Rate | |
576 | for Frame = 1, Frames do | |
577 | wait(Rate) | |
578 | local Percent = Frame / Frames | |
579 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
580 | TextLabel.TextTransparency = Percent | |
581 | end | |
582 | if EffectPart and EffectPart.Parent then | |
583 | EffectPart:Destroy() | |
584 | end | |
585 | end) | |
586 | end | |
587 | function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch) | |
588 | for _, c in pairs(workspace:children()) do | |
589 | local hum = c:findFirstChild("Humanoid") | |
590 | if hum ~= nil then | |
591 | local head = c:findFirstChild("Torso") | |
592 | if head ~= nil then | |
593 | local targ = head.Position - Part.Position | |
594 | local mag = targ.magnitude | |
595 | if Magnitude >= mag and c.Name ~= Player.Name then | |
596 | Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, 0, HitSound, HitPitch) | |
597 | end | |
598 | end | |
599 | end | |
600 | end | |
601 | end | |
602 | --//New Damage\\-- | |
603 | function Damage2(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
604 | if hit.Parent == nil then | |
605 | return | |
606 | end | |
607 | local h = hit.Parent:FindFirstChild("Humanoid") | |
608 | for _, v in pairs(hit.Parent:children()) do | |
609 | if v:IsA("Humanoid") then | |
610 | h = v | |
611 | end | |
612 | end | |
613 | if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then | |
614 | if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then | |
615 | return | |
616 | end | |
617 | local c = Create("ObjectValue")({ | |
618 | Name = "creator", | |
619 | Value = game:service("Players").LocalPlayer, | |
620 | Parent = h | |
621 | }) | |
622 | game:GetService("Debris"):AddItem(c, 0.5) | |
623 | if HitSound ~= nil and HitPitch ~= nil then | |
624 | CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) | |
625 | end | |
626 | local Damage = math.random(minim, maxim) | |
627 | local blocked = false | |
628 | local block = hit.Parent:findFirstChild("Block") | |
629 | if block ~= nil and block.className == "IntValue" and block.Value > 0 then | |
630 | blocked = true | |
631 | block.Value = block.Value - 1 | |
632 | print(block.Value) | |
633 | end | |
634 | if blocked == false then | |
635 | h.Health = h.Health - Damage | |
636 | ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, BrickColor.new("Really black").Color) | |
637 | else | |
638 | h.Health = h.Health - Damage / 2 | |
639 | ShowDamage(Part.CFrame * CFrame.new(0, 0, Part.Size.Z / 2).p + Vector3.new(0, 1.5, 0), -Damage, 1.5, BrickColor.new("Really black").Color) | |
640 | end | |
641 | if Type == "Knockdown" then | |
642 | local hum = hit.Parent.Humanoid | |
643 | hum.PlatformStand = true | |
644 | coroutine.resume(coroutine.create(function(HHumanoid) | |
645 | swait(1) | |
646 | HHumanoid.PlatformStand = false | |
647 | end), hum) | |
648 | local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit | |
649 | local bodvol = Create("BodyVelocity")({ | |
650 | velocity = angle * knockback, | |
651 | P = 5000, | |
652 | maxForce = Vector3.new(8000, 8000, 8000), | |
653 | Parent = hit | |
654 | }) | |
655 | local rl = Create("BodyAngularVelocity")({ | |
656 | P = 3000, | |
657 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
658 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
659 | Parent = hit | |
660 | }) | |
661 | game:GetService("Debris"):AddItem(bodvol, 0.5) | |
662 | game:GetService("Debris"):AddItem(rl, 0.5) | |
663 | elseif Type == "Normal" then | |
664 | local vp = Create("BodyVelocity")({ | |
665 | P = 500, | |
666 | maxForce = Vector3.new(math.huge, 0, math.huge), | |
667 | velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05 | |
668 | }) | |
669 | if knockback > 0 then | |
670 | vp.Parent = hit.Parent.Torso | |
671 | end | |
672 | game:GetService("Debris"):AddItem(vp, 0.5) | |
673 | elseif Type == "Up" then | |
674 | local bodyVelocity = Create("BodyVelocity")({ | |
675 | velocity = Vector3.new(0, 20, 0), | |
676 | P = 5000, | |
677 | maxForce = Vector3.new(8000, 8000, 8000), | |
678 | Parent = hit | |
679 | }) | |
680 | game:GetService("Debris"):AddItem(bodyVelocity, 0.5) | |
681 | elseif Type == "DarkUp" then | |
682 | coroutine.resume(coroutine.create(function() | |
683 | for i = 0, 1, 0.1 do | |
684 | swait() | |
685 | Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, 0.08, 1) | |
686 | end | |
687 | end)) | |
688 | local bodyVelocity = Create("BodyVelocity")({ | |
689 | velocity = Vector3.new(0, 20, 0), | |
690 | P = 5000, | |
691 | maxForce = Vector3.new(8000, 8000, 8000), | |
692 | Parent = hit | |
693 | }) | |
694 | game:GetService("Debris"):AddItem(bodyVelocity, 1) | |
695 | elseif Type == "Snare" then | |
696 | local bp = Create("BodyPosition")({ | |
697 | P = 2000, | |
698 | D = 100, | |
699 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
700 | position = hit.Parent.Torso.Position, | |
701 | Parent = hit.Parent.Torso | |
702 | }) | |
703 | game:GetService("Debris"):AddItem(bp, 1) | |
704 | elseif Type == "Freeze" then | |
705 | local BodPos = Create("BodyPosition")({ | |
706 | P = 50000, | |
707 | D = 1000, | |
708 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
709 | position = hit.Parent.Torso.Position, | |
710 | Parent = hit.Parent.Torso | |
711 | }) | |
712 | local BodGy = Create("BodyGyro")({ | |
713 | maxTorque = Vector3.new(400000, 400000, 400000) * math.huge, | |
714 | P = 20000, | |
715 | Parent = hit.Parent.Torso, | |
716 | cframe = hit.Parent.Torso.CFrame | |
717 | }) | |
718 | hit.Parent.Torso.Anchored = true | |
719 | coroutine.resume(coroutine.create(function(Part) | |
720 | swait(1.5) | |
721 | Part.Anchored = false | |
722 | end), hit.Parent.Torso) | |
723 | game:GetService("Debris"):AddItem(BodPos, 3) | |
724 | game:GetService("Debris"):AddItem(BodGy, 3) | |
725 | end | |
726 | local debounce = Create("BoolValue")({ | |
727 | Name = "DebounceHit", | |
728 | Parent = hit.Parent, | |
729 | Value = true | |
730 | }) | |
731 | game:GetService("Debris"):AddItem(debounce, Delay) | |
732 | c = Create("ObjectValue")({ | |
733 | Name = "creator", | |
734 | Value = Player, | |
735 | Parent = h | |
736 | }) | |
737 | game:GetService("Debris"):AddItem(c, 0.5) | |
738 | end | |
739 | end | |
740 | function ShowDamage2(Pos, Text, Time, Color) | |
741 | local Rate = 0.03333333333333333 | |
742 | local Pos = Pos or Vector3.new(0, 0, 0) | |
743 | local Text = Text or "" | |
744 | local Time = Time or 2 | |
745 | local Color = Color or Color3.new(1, 0, 1) | |
746 | local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
747 | EffectPart.Anchored = true | |
748 | local BillboardGui = Create("BillboardGui")({ | |
749 | Size = UDim2.new(3, 0, 3, 0), | |
750 | Adornee = EffectPart, | |
751 | Parent = EffectPart | |
752 | }) | |
753 | local TextLabel = Create("TextLabel")({ | |
754 | BackgroundTransparency = 1, | |
755 | Size = UDim2.new(1, 0, 1, 0), | |
756 | Text = Text, | |
757 | Font = "SciFi", | |
758 | TextColor3 = Color, | |
759 | TextScaled = true, | |
760 | Parent = BillboardGui | |
761 | }) | |
762 | game.Debris:AddItem(EffectPart, Time) | |
763 | EffectPart.Parent = game:GetService("Workspace") | |
764 | delay(0, function() | |
765 | local Frames = Time / Rate | |
766 | for Frame = 1, Frames do | |
767 | wait(Rate) | |
768 | local Percent = Frame / Frames | |
769 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
770 | TextLabel.TextTransparency = Percent | |
771 | end | |
772 | if EffectPart and EffectPart.Parent then | |
773 | EffectPart:Destroy() | |
774 | end | |
775 | end) | |
776 | end | |
777 | function MagnitudeDamage2(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch) | |
778 | for _, c in pairs(workspace:children()) do | |
779 | local hum = c:findFirstChild("Humanoid") | |
780 | if hum ~= nil then | |
781 | local head = c:findFirstChild("Torso") | |
782 | if head ~= nil then | |
783 | local targ = head.Position - Part.Position | |
784 | local mag = targ.magnitude | |
785 | if Magnitude >= mag and c.Name ~= Player.Name then | |
786 | Damage2(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, 0, HitSound, HitPitch) | |
787 | end | |
788 | end | |
789 | end | |
790 | end | |
791 | end | |
792 | ---------------------- | |
793 | Handle = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Really black", "Handle", Vector3.new(0.400000036, 0.400000006, 1.20000005)) | |
794 | HandleWeld = CFuncs.Weld.Create(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.0921096802, -1.06268024, -0.143123627, 1, 0, 0, 0, -1, 0, 0, 0, -1)) | |
795 | Barrel = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Barrel", Vector3.new(0.250000003, 0.250000003, 0.250000024)) | |
796 | Mesh = Instance.new("SpecialMesh",Barrel) | |
797 | Mesh.MeshId = "rbxassetid://442405779" | |
798 | Mesh.TextureId = "rbxassetid://442405780" | |
799 | Mesh.Scale = Vector3.new(0.06,0.06,0.06) | |
800 | BarrelWeld = CFuncs.Weld.Create(m, Handle, Barrel, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00579071045, -1.59999704, 0.500003815, 1, 0, 0, 0, 1, 0, 0, 0, 1)) | |
801 | JetpackHandle = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Really black", "JetpackHandle", Vector3.new(0.200000003, 0.200000003, 0.200000003)) | |
802 | JetpackHandleWeld = CFuncs.Weld.Create(m, Character.Torso, JetpackHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(7.62939453E-6, -0.400000662, -2.30000019, 0.999999821, -3.64178788E-7, -8.94072372E-8, 3.63716538E-7, 1, 7.422572E-10, 2.98025853E-8, -1.13686838E-13, 0.999999881)) | |
803 | EffectPartR1 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartR1", Vector3.new(0.5, 0.5, 0.300000012)) | |
804 | EffectPartR1Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartR1, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.09364891, -0.187623501, -0.0701560974, 0.906307757, 3.29325474E-7, -0.422617853, -0.144542456, 0.939694047, -0.309971899, 0.397131324, 0.34201628, 0.851652086)) | |
805 | EffectPartL1 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartL1", Vector3.new(0.5, 0.5, 0.300000012)) | |
806 | EffectPartL1Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartL1, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(1.02251816, -0.220495224, 0.120153427, 0.965927601, 1.32644391E-6, 0.258812487, 0.0885165557, 0.939698577, -0.330363601, -0.243205622, 0.342014492, 0.907681763)) | |
807 | EffectPartR2 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartR2", Vector3.new(0.5, 0.5, 0.300000012)) | |
808 | EffectPartR2Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartR2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.093647, 0.123265266, 0.0195560455, 0.906307757, 3.29325474E-7, -0.422617853, -0.109380148, 0.965926826, -0.234566003, 0.408217847, 0.25881511, 0.875427186)) | |
809 | EffectPartL2 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartL2", Vector3.new(0.5, 0.5, 0.300000012)) | |
810 | EffectPartL2Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartL2, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(1.02252197, 0.0983912945, 0.212385654, 0.96592772, 1.15327362E-6, 0.258813411, 0.0669838786, 0.965926588, -0.249997437, -0.249995068, 0.258815855, 0.933015227)) | |
811 | EffectPartL3 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartL3", Vector3.new(0.400000006, 0.5, 0.300000012)) | |
812 | EffectPartL3Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartL3, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.86114502, 1.02306592, -0.343766928, 0.981060922, -0.0278283078, 0.19168894, -0.0858270004, 0.824720919, 0.558989346, -0.173645675, -0.56485492, 0.806713104)) | |
813 | EffectPartR3 = CFuncs.Part.Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "EffectPartR3", Vector3.new(0.400000006, 0.5, 0.300000012)) | |
814 | EffectPartR3Weld = CFuncs.Weld.Create(m, JetpackHandle, EffectPartR3, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.83058548, 1.0264864, -0.312187195, 0.981061339, 0.0278254021, -0.191695988, 0.0858334452, 0.824721098, 0.558989942, 0.173649624, -0.564855158, 0.806710064)) | |
815 | CFuncs.Mesh.Create("SpecialMesh", JetpackHandle, Enum.MeshType.FileMesh, "rbxassetid://0", Vector3.new(0, 0, 0), Vector3.new(1.29999995, 1.29999995, 1.29999995)) | |
816 | EffectModel = Create("Model")({Parent = Character, Name = "Effects"}) | |
817 | Effects = { | |
818 | Block = { | |
819 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
820 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
821 | prt.Anchored = true | |
822 | prt.CFrame = cframe | |
823 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
824 | game:GetService("Debris"):AddItem(prt, 10) | |
825 | if Type == 1 or Type == nil then | |
826 | table.insert(Effects, { | |
827 | prt, | |
828 | "Block1", | |
829 | delay, | |
830 | x3, | |
831 | y3, | |
832 | z3, | |
833 | msh | |
834 | }) | |
835 | elseif Type == 2 then | |
836 | table.insert(Effects, { | |
837 | prt, | |
838 | "Block2", | |
839 | delay, | |
840 | x3, | |
841 | y3, | |
842 | z3, | |
843 | msh | |
844 | }) | |
845 | end | |
846 | end | |
847 | }, | |
848 | Cylinder = { | |
849 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
850 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2)) | |
851 | prt.Anchored = true | |
852 | prt.CFrame = cframe | |
853 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
854 | game:GetService("Debris"):AddItem(prt, 2) | |
855 | Effects[#Effects + 1] = { | |
856 | prt, | |
857 | "Cylinder", | |
858 | delay, | |
859 | x3, | |
860 | y3, | |
861 | z3, | |
862 | msh | |
863 | } | |
864 | end | |
865 | }, | |
866 | Head = { | |
867 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
868 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
869 | prt.Anchored = true | |
870 | prt.CFrame = cframe | |
871 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
872 | game:GetService("Debris"):AddItem(prt, 10) | |
873 | table.insert(Effects, { | |
874 | prt, | |
875 | "Cylinder", | |
876 | delay, | |
877 | x3, | |
878 | y3, | |
879 | z3, | |
880 | msh | |
881 | }) | |
882 | end | |
883 | }, | |
884 | Sphere = { | |
885 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
886 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
887 | prt.Anchored = true | |
888 | prt.CFrame = cframe | |
889 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
890 | game:GetService("Debris"):AddItem(prt, 10) | |
891 | table.insert(Effects, { | |
892 | prt, | |
893 | "Cylinder", | |
894 | delay, | |
895 | x3, | |
896 | y3, | |
897 | z3, | |
898 | msh | |
899 | }) | |
900 | end | |
901 | }, | |
902 | Elect = { | |
903 | Create = function(cff, x, y, z) | |
904 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1)) | |
905 | prt.Anchored = true | |
906 | prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z)) | |
907 | prt.CFrame = CFrame.new(prt.Position) | |
908 | game:GetService("Debris"):AddItem(prt, 2) | |
909 | local xval = math.random() / 2 | |
910 | local yval = math.random() / 2 | |
911 | local zval = math.random() / 2 | |
912 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval)) | |
913 | table.insert(Effects, { | |
914 | prt, | |
915 | "Elec", | |
916 | 0.1, | |
917 | x, | |
918 | y, | |
919 | z, | |
920 | xval, | |
921 | yval, | |
922 | zval | |
923 | }) | |
924 | end | |
925 | }, | |
926 | Ring = { | |
927 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
928 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
929 | prt.Anchored = true | |
930 | prt.CFrame = cframe | |
931 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
932 | game:GetService("Debris"):AddItem(prt, 10) | |
933 | table.insert(Effects, { | |
934 | prt, | |
935 | "Cylinder", | |
936 | delay, | |
937 | x3, | |
938 | y3, | |
939 | z3, | |
940 | msh | |
941 | }) | |
942 | end | |
943 | }, | |
944 | Wave = { | |
945 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
946 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
947 | prt.Anchored = true | |
948 | prt.CFrame = cframe | |
949 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
950 | game:GetService("Debris"):AddItem(prt, 10) | |
951 | table.insert(Effects, { | |
952 | prt, | |
953 | "Cylinder", | |
954 | delay, | |
955 | x3, | |
956 | y3, | |
957 | z3, | |
958 | msh | |
959 | }) | |
960 | end | |
961 | }, | |
962 | Break = { | |
963 | Create = function(brickcolor, cframe, x1, y1, z1) | |
964 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
965 | prt.Anchored = true | |
966 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
967 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
968 | local num = math.random(10, 50) / 1000 | |
969 | game:GetService("Debris"):AddItem(prt, 10) | |
970 | table.insert(Effects, { | |
971 | prt, | |
972 | "Shatter", | |
973 | num, | |
974 | prt.CFrame, | |
975 | math.random() - math.random(), | |
976 | 0, | |
977 | math.random(50, 100) / 100 | |
978 | }) | |
979 | end | |
980 | }, | |
981 | Fire = { | |
982 | Create = function(brickcolor, cframe, x1, y1, z1, delay) | |
983 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
984 | prt.Anchored = true | |
985 | prt.CFrame = cframe | |
986 | msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
987 | game:GetService("Debris"):AddItem(prt, 10) | |
988 | table.insert(Effects, { | |
989 | prt, | |
990 | "Fire", | |
991 | delay, | |
992 | 1, | |
993 | 1, | |
994 | 1, | |
995 | msh | |
996 | }) | |
997 | end | |
998 | }, | |
999 | FireWave = { | |
1000 | Create = function(brickcolor, cframe, x1, y1, z1) | |
1001 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new()) | |
1002 | prt.Anchored = true | |
1003 | prt.CFrame = cframe | |
1004 | msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
1005 | local d = Create("Decal")({ | |
1006 | Parent = prt, | |
1007 | Texture = "rbxassetid://26356434", | |
1008 | Face = "Top" | |
1009 | }) | |
1010 | local d = Create("Decal")({ | |
1011 | Parent = prt, | |
1012 | Texture = "rbxassetid://26356434", | |
1013 | Face = "Bottom" | |
1014 | }) | |
1015 | game:GetService("Debris"):AddItem(prt, 10) | |
1016 | table.insert(Effects, { | |
1017 | prt, | |
1018 | "FireWave", | |
1019 | 1, | |
1020 | 30, | |
1021 | math.random(400, 600) / 100, | |
1022 | msh | |
1023 | }) | |
1024 | end | |
1025 | }, | |
1026 | Lightning = { | |
1027 | Create = function(p0, p1, tym, ofs, col, th, tra, last) | |
1028 | local magz = (p0 - p1).magnitude | |
1029 | local curpos = p0 | |
1030 | local trz = { | |
1031 | -ofs, | |
1032 | ofs | |
1033 | } | |
1034 | for i = 1, tym do | |
1035 | local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym)) | |
1036 | local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)]) | |
1037 | local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz | |
1038 | li.Material = "Neon" | |
1039 | if tym == i then | |
1040 | local magz2 = (curpos - p1).magnitude | |
1041 | li.Size = Vector3.new(th, th, magz2) | |
1042 | li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2) | |
1043 | table.insert(Effects, { | |
1044 | li, | |
1045 | "Disappear", | |
1046 | last | |
1047 | }) | |
1048 | else | |
1049 | li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2) | |
1050 | curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p | |
1051 | game.Debris:AddItem(li, 10) | |
1052 | table.insert(Effects, { | |
1053 | li, | |
1054 | "Disappear", | |
1055 | last | |
1056 | }) | |
1057 | end | |
1058 | end | |
1059 | end | |
1060 | }, | |
1061 | EffectTemplate = {} | |
1062 | } | |
1063 | function Shootcombo() | |
1064 | local MouseLook = CFrame.new((Barrel.Position + Mouse.Hit.p) / 2, Mouse.Hit.p) | |
1065 | CFuncs.Sound.Create("173979241", Handle, 1, 1) | |
1066 | Effects.Sphere.Create(BrickColor.new("Really black"), Barrel.CFrame, 0.5, 0.5, 0.5, 1,1,1, 0.09) | |
1067 | Effects.Sphere.Create(BrickColor.new("Really black"), Barrel.CFrame, 1, 1, 1, 1,1,1, 0.09) | |
1068 | Effects.Block.Create(BrickColor.new("Really black"), Barrel.CFrame, 1, 1, 1, 1,1,1, 0.09, 1) | |
1069 | table.insert(Effects, { | |
1070 | MouseLook.lookVector, | |
1071 | "Shoot", | |
1072 | 30, | |
1073 | Barrel.Position, | |
1074 | 6, | |
1075 | 8, | |
1076 | 0, | |
1077 | 1 | |
1078 | }) | |
1079 | end | |
1080 | function Bolt() | |
1081 | CFuncs.Sound.Create("173979241", Handle, 1, 1) | |
1082 | end | |
1083 | function SpinShot() | |
1084 | attack = true | |
1085 | for i = 0, 1, 0.12 do | |
1086 | swait() | |
1087 | PlayAnimationFromTable({ | |
1088 | CFrame.new(-0.33084622, -0.304918617, -0.52869457, 0.342018992, 2.44630968E-7, -0.939693093, 0.163176, 0.98480773, 0.0593912415, 0.925417006, -0.173648283, 0.336822927) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1089 | CFrame.new(0.0322597921, 1.48268783, -0.0930604339, 0.322602183, 0.14004983, 0.936116517, -0.172989488, 0.981059611, -0.0871584788, -0.930592477, -0.133820817, 0.340719253) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1090 | CFrame.new(0.506988645, 0.377255857, -0.803069711, 0.259420365, 0.955582082, -0.139867067, 0.0992426202, -0.170435682, -0.980358601, -0.960651875, 0.240444362, -0.139049053) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1091 | CFrame.new(-1.72998452, 0.495006025, -0.392647803, 0.542880952, 0.410539567, 0.732626021, 0.737672389, 0.183852568, -0.649647713, -0.4013969, 0.893121183, -0.203034982) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1092 | CFrame.new(0.502950907, -1.9151485, 0.231621087, 0.864151537, 0.0236141682, -0.502677977, 0.0515102148, 0.989501238, 0.135033786, 0.50058949, -0.142582476, 0.853862286) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1093 | CFrame.new(-0.865711927, -1.63087702, -0.282848835, 0.925415218, 0.173649043, 0.336827427, -0.163176641, 0.98480773, -0.0593916178, -0.342023462, -4.54019755E-7, 0.939691782) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1094 | }, 0.35, false) | |
1095 | end | |
1096 | Shootcombo() | |
1097 | for i = 0, 1, 0.3 do | |
1098 | swait() | |
1099 | RootPart.Velocity = RootPart.CFrame.lookVector * -10 | |
1100 | PlayAnimationFromTable({ | |
1101 | CFrame.new(-0.330845773, -0.378038257, 0.581278205, 0.342019081, 5.60612747E-8, -0.939693093, -0.0819000229, 0.996194661, -0.0298090074, 0.936117232, 0.0871561244, 0.340717614) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1102 | CFrame.new(0.0322549939, 1.48268545, -0.0930609033, 0.239786834, -0.113366202, 0.964181364, -0.164735377, 0.974004149, 0.155488253, -0.95675236, -0.196119189, 0.214875787) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1103 | CFrame.new(0.806416035, 0.470317304, -0.694097638, 0.244436547, 0.969400585, 0.0226592347, 0.0830115676, 0.00236219168, -0.996545851, -0.9661057, 0.245473176, -0.079894051) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1104 | CFrame.new(-1.57694697, 0.512434185, -0.230538517, 0.760710716, 0.410538197, 0.502765059, 0.470990688, 0.1838523, -0.862764716, -0.44662869, 0.893119931, -0.0535021573) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1105 | CFrame.new(0.865904212, -1.71960115, 0.0648829341, 0.881422341, -0.173719466, -0.439225137, 0.290622324, 0.932511985, 0.214389697, 0.372338951, -0.316616565, 0.872420609) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1106 | CFrame.new(-0.679471731, -1.82845092, -0.362076759, 0.770665169, -0.0483331755, 0.635404408, -0.0295864344, 0.993330181, 0.111444041, -0.63655293, -0.104685426, 0.764095306) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1107 | }, 0.5, false) | |
1108 | end | |
1109 | for i = 0, 1, 0.12 do | |
1110 | swait() | |
1111 | PlayAnimationFromTable({ | |
1112 | CFrame.new(-0.33084622, -0.304918617, -0.52869457, 0.342018992, 2.44630968E-7, -0.939693093, 0.163176, 0.98480773, 0.0593912415, 0.925417006, -0.173648283, 0.336822927) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1113 | CFrame.new(0.0322597921, 1.48268783, -0.0930604339, 0.322602183, 0.14004983, 0.936116517, -0.172989488, 0.981059611, -0.0871584788, -0.930592477, -0.133820817, 0.340719253) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1114 | CFrame.new(0.506988645, 0.377255857, -0.803069711, 0.259420365, 0.955582082, -0.139867067, 0.0992426202, -0.170435682, -0.980358601, -0.960651875, 0.240444362, -0.139049053) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1115 | CFrame.new(-1.72998452, 0.495006025, -0.392647803, 0.542880952, 0.410539567, 0.732626021, 0.737672389, 0.183852568, -0.649647713, -0.4013969, 0.893121183, -0.203034982) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1116 | CFrame.new(0.502950907, -1.9151485, 0.231621087, 0.864151537, 0.0236141682, -0.502677977, 0.0515102148, 0.989501238, 0.135033786, 0.50058949, -0.142582476, 0.853862286) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1117 | CFrame.new(-0.865711927, -1.63087702, -0.282848835, 0.925415218, 0.173649043, 0.336827427, -0.163176641, 0.98480773, -0.0593916178, -0.342023462, -4.54019755E-7, 0.939691782) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1118 | }, 0.4, false) | |
1119 | end | |
1120 | Bolt() | |
1121 | attack = false | |
1122 | end | |
1123 | function LungeShot(Mode) | |
1124 | attack = true | |
1125 | Humanoid.Jump = true | |
1126 | CFuncs.Sound.Create("158149887", Torso, 1, 0.9) | |
1127 | if Mode == "Forward" then | |
1128 | RootPart.Velocity = RootPart.CFrame.lookVector * 80 | |
1129 | for i = 0, 1, 0.1 do | |
1130 | swait() | |
1131 | PlayAnimationFromTable({ | |
1132 | CFrame.new(-3.81469727E-6, 0.0628450513, 0.146824121, 1, 0, 0, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-20), 0, 0), | |
1133 | CFrame.new(0, 1.49998665, -2.20537186E-6, 1, 0, 0, 0, 0.984807312, 0.173648536, 0, -0.173648536, 0.984807312) * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(20), 0, 0), | |
1134 | CFrame.new(0.523067951, 0.10826005, -0.698177814, 0.296512067, 0.787702143, 0.540005624, 0.206982568, 0.498990804, -0.84152633, -0.932329774, 0.361294419, -0.0150838122) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1135 | CFrame.new(-1.42747557, -0.117001235, -0.482704312, 0.268235743, 0.0413863063, 0.962466657, 0.56728673, 0.800693691, -0.192532867, -0.778610408, 0.597635567, 0.191299409) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1136 | CFrame.new(0.499998361, -1.51702964, -0.129410475, 0.984807849, 0, -0.173648044, 0.0449435376, 0.965925634, 0.25488764, 0.167731121, -0.258819699, 0.951251149) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1137 | CFrame.new(-0.500004053, -1.35084605, -0.555529714, 0.981060445, 0.0871543288, 0.172987863, -0.140045926, 0.936115682, 0.322606146, -0.133820146, -0.340722382, 0.930591524) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1138 | }, 0.3, false) | |
1139 | end | |
1140 | elseif Mode == "Backward" then | |
1141 | RootPart.Velocity = RootPart.CFrame.lookVector * -80 | |
1142 | for i = 0, 1, 0.1 do | |
1143 | swait() | |
1144 | PlayAnimationFromTable({ | |
1145 | CFrame.new(-3.81469727E-6, 0.0628450513, 0.146824121, 1, 0, 0, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(10), 0, 0), | |
1146 | CFrame.new(0, 1.49998665, -2.20537186E-6, 1, 0, 0, 0, 0.984807312, 0.173648536, 0, -0.173648536, 0.984807312) * CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-10), 0, 0), | |
1147 | CFrame.new(0.523067951, 0.10826005, -0.698177814, 0.296512067, 0.787702143, 0.540005624, 0.206982568, 0.498990804, -0.84152633, -0.932329774, 0.361294419, -0.0150838122) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1148 | CFrame.new(-1.42747557, -0.117001235, -0.482704312, 0.268235743, 0.0413863063, 0.962466657, 0.56728673, 0.800693691, -0.192532867, -0.778610408, 0.597635567, 0.191299409) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1149 | CFrame.new(0.499998361, -1.51702964, -0.129410475, 0.984807849, 0, -0.173648044, 0.0449435376, 0.965925634, 0.25488764, 0.167731121, -0.258819699, 0.951251149) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1150 | CFrame.new(-0.500004053, -1.35084605, -0.555529714, 0.981060445, 0.0871543288, 0.172987863, -0.140045926, 0.936115682, 0.322606146, -0.133820146, -0.340722382, 0.930591524) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1151 | }, 0.3, false) | |
1152 | end | |
1153 | end | |
1154 | local hitfloor | |
1155 | while hitfloor == nil do | |
1156 | swait() | |
1157 | hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 6, Character) | |
1158 | end | |
1159 | for i = 0, 1, 0.2 do | |
1160 | swait() | |
1161 | PlayAnimationFromTable({ | |
1162 | CFrame.new(-0.330837339, -0.699999928, -0.231655031, 0.342019022, 0, -0.939693093, 0, 1, 0, 0.939693093, 0, 0.342018992) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1163 | CFrame.new(0.120368131, 1.44721556, -0.255113155, 0.418385565, -0.00512788072, 0.908255041, -0.141075298, 0.987487316, 0.0705598369, -0.897252142, -0.157652482, 0.412421852) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1164 | CFrame.new(0.285862863, 0.389394581, -0.81719619, 0.340717524, 0.939693093, 0.0298089981, 0.087155968, 0, -0.996194661, -0.936117232, 0.342018992, -0.081899859) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1165 | CFrame.new(-1.69020307, 0.41307798, -0.514919221, 0.800103247, 0.517377436, 0.303571403, 0.255382031, 0.16412276, -0.95280838, -0.542784572, 0.839871705, -8.13782215E-4) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1166 | CFrame.new(0.897276342, -1.54715633, 0.463865459, 0.951250672, -0.229007483, -0.206587687, 0.304395527, 0.589249432, 0.748417377, -0.0496615469, -0.774816513, 0.630232751) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1167 | CFrame.new(-0.632248044, -1.39177239, -0.405484438, 0.817636669, -0.123517469, 0.562330127, 0.0563425981, 0.989193141, 0.13535662, -0.572972655, -0.0789892152, 0.815760136) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1168 | }, 0.4, false) | |
1169 | end | |
1170 | Shootcombo() | |
1171 | for i = 0, 1, 0.3 do | |
1172 | swait() | |
1173 | RootPart.Velocity = RootPart.CFrame.lookVector * -40 | |
1174 | PlayAnimationFromTable({ | |
1175 | CFrame.new(-0.330840945, -1.00127292, -0.261750877, 0.342018962, -1.4270141E-7, -0.939693034, -0.243209973, 0.965925992, -0.0885209814, 0.907673895, 0.258818597, 0.330364913) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1176 | CFrame.new(0.120366111, 1.44719875, -0.255110145, 0.418383747, -0.0842670798, 0.904353142, -0.141075209, 0.977573991, 0.156355858, -0.897247374, -0.192998484, 0.397113085) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1177 | CFrame.new(0.632638395, 0.661208212, -0.690981925, 0.326495707, 0.925417125, 0.192363232, 0.0858313814, 0.173647493, -0.981060386, -0.941293538, 0.336822778, -0.0227346662) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1178 | CFrame.new(-1.51982272, 0.476396978, -0.384689331, 0.81248939, 0.445674956, 0.37581408, 0.350734472, 0.141240373, -0.925762773, -0.46566987, 0.88398242, -0.0415571854) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1179 | CFrame.new(0.783671975, -1.17622542, 0.561357141, 0.831630051, -0.23809275, -0.501700282, 0.550981283, 0.240921408, 0.798984766, -0.0693621933, -0.940887034, 0.331542104) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1180 | CFrame.new(-0.632252574, -1.39177251, -0.40547961, 0.73177588, -0.317396253, 0.603132486, 0.21459803, 0.947232425, 0.238111958, -0.646885633, -0.0448122993, 0.761271358) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1181 | }, 0.6, false) | |
1182 | end | |
1183 | Bolt() | |
1184 | attack = false | |
1185 | end | |
1186 | function AutoShot() | |
1187 | attack = true | |
1188 | Humanoid.WalkSpeed = 5 | |
1189 | Bolt() | |
1190 | for i = 0, 1, 0.3 do | |
1191 | swait() | |
1192 | PlayAnimationFromTable({ | |
1193 | CFrame.new(-0.330837339, -0.699999928, -0.231655031, 0.342019022, 0, -0.939693093, 0, 1, 0, 0.939693093, 0, 0.342018992) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1194 | CFrame.new(0.120368131, 1.44721556, -0.255113155, 0.418385565, -0.00512788072, 0.908255041, -0.141075298, 0.987487316, 0.0705598369, -0.897252142, -0.157652482, 0.412421852) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1195 | CFrame.new(0.285862863, 0.389394581, -0.81719619, 0.340717524, 0.939693093, 0.0298089981, 0.087155968, 0, -0.996194661, -0.936117232, 0.342018992, -0.081899859) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1196 | CFrame.new(-1.69020307, 0.41307798, -0.514919221, 0.800103247, 0.517377436, 0.303571403, 0.255382031, 0.16412276, -0.95280838, -0.542784572, 0.839871705, -8.13782215E-4) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1197 | CFrame.new(0.897276342, -1.54715633, 0.463865459, 0.951250672, -0.229007483, -0.206587687, 0.304395527, 0.589249432, 0.748417377, -0.0496615469, -0.774816513, 0.630232751) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1198 | CFrame.new(-0.632248044, -1.39177239, -0.405484438, 0.817636669, -0.123517469, 0.562330127, 0.0563425981, 0.989193141, 0.13535662, -0.572972655, -0.0789892152, 0.815760136) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1199 | }, 0.4, false) | |
1200 | end | |
1201 | Humanoid.WalkSpeed = 0 | |
1202 | for i = 1, 10 do | |
1203 | for i = 0, 1, 0.8 do | |
1204 | swait() | |
1205 | PlayAnimationFromTable({ | |
1206 | CFrame.new(-0.330837339, -0.699999928, -0.231655031, 0.342019022, 0, -0.939693093, 0, 1, 0, 0.939693093, 0, 0.342018992) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1207 | CFrame.new(0.120368131, 1.44721556, -0.255113155, 0.418385565, -0.00512788072, 0.908255041, -0.141075298, 0.987487316, 0.0705598369, -0.897252142, -0.157652482, 0.412421852) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1208 | CFrame.new(0.285862863, 0.389394581, -0.81719619, 0.340717524, 0.939693093, 0.0298089981, 0.087155968, 0, -0.996194661, -0.936117232, 0.342018992, -0.081899859) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1209 | CFrame.new(-1.69020307, 0.41307798, -0.514919221, 0.800103247, 0.517377436, 0.303571403, 0.255382031, 0.16412276, -0.95280838, -0.542784572, 0.839871705, -8.13782215E-4) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1210 | CFrame.new(0.897276342, -1.54715633, 0.463865459, 0.951250672, -0.229007483, -0.206587687, 0.304395527, 0.589249432, 0.748417377, -0.0496615469, -0.774816513, 0.630232751) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1211 | CFrame.new(-0.632248044, -1.39177239, -0.405484438, 0.817636669, -0.123517469, 0.562330127, 0.0563425981, 0.989193141, 0.13535662, -0.572972655, -0.0789892152, 0.815760136) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1212 | }, 0.7, false) | |
1213 | end | |
1214 | Shootcombo() | |
1215 | for i = 0, 1, 0.9 do | |
1216 | swait() | |
1217 | PlayAnimationFromTable({ | |
1218 | CFrame.new(-0.330840945, -1.00127292, -0.261750877, 0.342018962, -1.4270141E-7, -0.939693034, -0.243209973, 0.965925992, -0.0885209814, 0.907673895, 0.258818597, 0.330364913) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1219 | CFrame.new(0.120366111, 1.44719875, -0.255110145, 0.418383747, -0.0842670798, 0.904353142, -0.141075209, 0.977573991, 0.156355858, -0.897247374, -0.192998484, 0.397113085) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1220 | CFrame.new(0.632638395, 0.661208212, -0.690981925, 0.326495707, 0.925417125, 0.192363232, 0.0858313814, 0.173647493, -0.981060386, -0.941293538, 0.336822778, -0.0227346662) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1221 | CFrame.new(-1.51982272, 0.476396978, -0.384689331, 0.81248939, 0.445674956, 0.37581408, 0.350734472, 0.141240373, -0.925762773, -0.46566987, 0.88398242, -0.0415571854) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1222 | CFrame.new(0.783671975, -1.17622542, 0.561357141, 0.831630051, -0.23809275, -0.501700282, 0.550981283, 0.240921408, 0.798984766, -0.0693621933, -0.940887034, 0.331542104) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1223 | CFrame.new(-0.632252574, -1.39177251, -0.40547961, 0.73177588, -0.317396253, 0.603132486, 0.21459803, 0.947232425, 0.238111958, -0.646885633, -0.0448122993, 0.761271358) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1224 | }, 0.8, false) | |
1225 | end | |
1226 | end | |
1227 | Humanoid.WalkSpeed = 16 | |
1228 | attack = false | |
1229 | end | |
1230 | function MortarShot() | |
1231 | attack = true | |
1232 | Humanoid.WalkSpeed = 5 | |
1233 | Bolt() | |
1234 | for i = 0, 1, 0.3 do | |
1235 | swait() | |
1236 | PlayAnimationFromTable({ | |
1237 | CFrame.new(-0.062730819, -1.35083091, -0.0234885216, 0.819151819, 0.368687779, -0.439385623, -0.573576868, 0.52654016, -0.627507091, 0, 0.766044974, 0.642787039) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1238 | CFrame.new(-0.0485280529, 1.45187008, 0.123812944, 0.90630585, -0.0368346125, 0.421014428, 0.178608507, 0.936241627, -0.302573681, -0.383025914, 0.349420995, 0.855100214) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1239 | CFrame.new(1.37136579, -0.011062175, -0.241436988, 0.866025329, 0.500000238, 0, 0.321393698, -0.556669831, -0.766044974, -0.383022636, 0.663414299, -0.642787039) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1240 | CFrame.new(-0.554796219, 0.778117955, -1.30101132, 0.814972818, -0.183016568, 0.549840331, 0.413680822, -0.480712891, -0.773164511, 0.40581724, 0.857566416, -0.316057503) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1241 | CFrame.new(0.745755255, -0.594750226, 0.689795136, 0.707485676, 0.0499878898, -0.704957783, 0.604335666, -0.559927046, 0.566798568, -0.366391778, -0.827032924, -0.426349699) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1242 | CFrame.new(-0.45294404, -1.60859108, 0.283076108, 0.724484801, -0.4477458, 0.524066269, -0.110680997, 0.674867868, 0.729592919, -0.680348873, -0.586582422, 0.439373374) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1243 | }, 0.4, false) | |
1244 | end | |
1245 | CFuncs.Sound.Create("173979241", Barrel, 1, 1) | |
1246 | Effects.Sphere.Create(BrickColor.new("Really black"), Barrel.CFrame, 6, 6, 6, 3, 3, 3, 0.1, m) | |
1247 | for i = 1, 20 do | |
1248 | local hit, pos = rayCast(Barrel.Position, Barrel.CFrame * CFrame.fromEulerAnglesXYZ(0, 5, 0).lookVector, 220, Character) | |
1249 | local mag = (Barrel.Position - pos).magnitude | |
1250 | Effects.Cylinder.Create(BrickColor.new("Really black"), Barrel.CFrame, 6, 99999, 6, -0.5, 1, -0.5, 0.1) | |
1251 | local cf2 = Mouse.Hit.p + Vector3.new(math.random(-30,30), 100, math.random(-30,30)) | |
1252 | local hit2, pos2 = rayCast(cf2, CFrame.new(cf2, cf2 - Vector3.new(0, 1, 0)).lookVector, 999, Character) | |
1253 | if hit2 ~= nil then | |
1254 | local d1 = CFuncs.Part.Create(workspace, "Neon", 0, 0.5, BrickColor.new("Really black"), "Effect", Vector3.new()) | |
1255 | d1.Anchored = true | |
1256 | d1.CFrame = CFrame.new(pos2) | |
1257 | game:GetService("Debris"):AddItem(d1, 5) | |
1258 | local msh = CFuncs.Mesh.Create("CylinderMesh", d1, "nil", "nil", Vector3.new(0, 0, 0), Vector3.new(30, 5, 30)) | |
1259 | local d2 = d1:Clone() | |
1260 | d2.Parent = d1 | |
1261 | d2.CFrame = CFrame.new(d1.Position) | |
1262 | d2.BrickColor = BrickColor.new("Medium stone gray") | |
1263 | d2.Mesh.Scale = Vector3.new(0, 5, 0) | |
1264 | table.insert(Effects, { | |
1265 | d1, | |
1266 | "QuadShot", | |
1267 | d2, | |
1268 | d2.Mesh, | |
1269 | 0 | |
1270 | }) | |
1271 | end | |
1272 | end | |
1273 | for i = 0, 1, 0.2 do | |
1274 | swait() | |
1275 | PlayAnimationFromTable({ | |
1276 | CFrame.new(-0.00381875038, -1.20960522, -0.0234894156, 0.906307876, 0.271653324, -0.323744416, -0.422617942, 0.582562923, -0.694272697, 0, 0.766045094, 0.64278698) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1277 | CFrame.new(-0.0485313386, 1.45186937, 0.12381205, 0.906306446, -0.036834389, 0.421012908, 0.178607732, 0.936241806, -0.302573651, -0.383024782, 0.349420667, 0.855100751) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1278 | CFrame.new(1.2566489, 0.0942437202, -0.366937846, 0.866025388, 0.499999881, 0, 0.32139343, -0.556669831, -0.766045094, -0.383022457, 0.663414538, -0.64278698) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1279 | CFrame.new(-0.669512153, 0.883427501, -1.42651618, 0.814972997, -0.183017969, 0.54984045, 0.413680524, -0.480712831, -0.773165226, 0.405818164, 0.85756737, -0.316057026) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1280 | CFrame.new(0.663835824, -0.644426942, 0.718474984, 0.819152117, -0.0996050313, -0.564861536, 0.496729434, -0.369217664, 0.785454273, -0.28679204, -0.923989952, -0.252968639) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1281 | CFrame.new(-0.597848773, -1.58645034, 0.419145882, 0.845831037, -0.0996147096, 0.524067461, -0.385522783, 0.564860702, 0.729592204, -0.368703246, -0.819151759, 0.439372897) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1282 | }, 0.4, false) | |
1283 | end | |
1284 | Humanoid.WalkSpeed = 16 | |
1285 | attack = false | |
1286 | end | |
1287 | function DisappearJetOnly() | |
1288 | for _, i in pairs(m:children()) do | |
1289 | if i == JetpackHandle then | |
1290 | coroutine.resume(coroutine.create(function(Part) | |
1291 | for i = 0, 1, 0.3 do | |
1292 | swait() | |
1293 | Part.Transparency = i | |
1294 | end | |
1295 | Part.Transparency = 1 | |
1296 | end), i) | |
1297 | end | |
1298 | end | |
1299 | end | |
1300 | function ReappearJetOnly() | |
1301 | for _, i in pairs(m:children()) do | |
1302 | if i == JetpackHandle then | |
1303 | coroutine.resume(coroutine.create(function(Part) | |
1304 | for i = 0, 1, 0.3 do | |
1305 | swait() | |
1306 | Part.Transparency = i | |
1307 | end | |
1308 | Part.Transparency = 0 | |
1309 | end), i) | |
1310 | end | |
1311 | end | |
1312 | end | |
1313 | local floornum = 0 | |
1314 | function JetDash() | |
1315 | attack = true | |
1316 | ReappearJetOnly() | |
1317 | Humanoid.WalkSpeed = 5 | |
1318 | for i = 0, 1, 0.05 do | |
1319 | swait() | |
1320 | Effects.Wave.Create(BrickColor.new("Really black"), Torso.CFrame * CFrame.Angles(2.4, 0, 0), 1, 1, 1, 2,2,2,0.4) | |
1321 | Effects.Break.Create(BrickColor.new("Really black"), Torso.CFrame, 0.2, 0.2, 0.2) | |
1322 | Effects.Break.Create(BrickColor.new("Really black"), Torso.CFrame, 0.2, 0.2, 0.2) | |
1323 | Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 15,15,15, 0.3, 1) | |
1324 | Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 15,15,15,0.3, 1) | |
1325 | Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 10,10,10, 0.2, 1) | |
1326 | Effects.Block.Create(BrickColor.new("Really black"), Torso.CFrame, 1, 1, 1, 10,10,10, 0.2, 1) | |
1327 | RootPart.Velocity = RootPart.CFrame.lookVector * 400 | |
1328 | PlayAnimationFromTable({ | |
1329 | CFrame.new(0, -0.436519086, -1.54268694, 1, 0, 0, 0, 0.573575079, 0.81915313, 0, -0.81915313, 0.573575079) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1330 | CFrame.new(0, 1.383762, 0.294095755, 1, 0, 0, 0, 0.766045392, -0.642790735, 0, 0.642790735, 0.766045392) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1331 | CFrame.new(0.639911652, 0.428372383, -0.839826643, 0.262888074, 0.933915675, 0.242263183, 0.536961675, 0.0669959337, -0.840942383, -0.80159986, 0.351159722, -0.483864516) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1332 | CFrame.new(-1.42905915, 0.103630304, -0.677020133, 0.509720683, 0.0942112952, 0.855166197, 0.742046118, 0.45486632, -0.492406994, -0.435376555, 0.885562658, 0.161945611) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1333 | CFrame.new(0.598487258, -1.49273849, 0.0829842687, 0.984807909, 7.31955607E-10, -0.173648015, 0.122787923, 0.707105517, 0.696365893, 0.122787446, -0.707108378, 0.696363151) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1334 | CFrame.new(-0.599626899, -1.7493062, -0.188390553, 0.996194661, 0, 0.087156795, -0.0298094582, 0.939692497, 0.340719461, -0.0819005892, -0.342020988, 0.936116517) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1335 | }, 0.6, false) | |
1336 | end | |
1337 | for i = 0, 1, 0.05 do | |
1338 | swait() | |
1339 | Effects.Fire.Create(BrickColor.new("Really black"), EffectPartL3.CFrame, 3, 3, 3, 0.3) | |
1340 | Effects.Fire.Create(BrickColor.new("Really black"), EffectPartR3.CFrame, 3, 3, 3, 0.3) | |
1341 | RootPart.Velocity = RootPart.CFrame.lookVector * 60 | |
1342 | PlayAnimationFromTable({ | |
1343 | CFrame.new(-0.313091278, -0.629250288, 0.409977496, 0.422617137, -0.383021861, -0.821394563, 0, 0.906308115, -0.422617614, 0.906308293, 0.178605452, 0.383021355) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1344 | CFrame.new(-2.89082527E-6, 1.56999886, -0.169927716, 0.499998629, -0.0754772127, 0.862731218, -0.224145666, 0.950971425, 0.213101521, -0.836516559, -0.29992786, 0.458566666) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1345 | CFrame.new(0.639911413, 0.428367913, -0.839831948, 0.262887627, 0.933916271, 0.242261022, 0.536960125, 0.0669948608, -0.840943277, -0.801600933, 0.351158082, -0.483863741) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1346 | CFrame.new(-1.42906761, 0.103628337, -0.677013278, 0.509718478, 0.0942142606, 0.85516715, 0.742045939, 0.454867214, -0.4924061, -0.435379177, 0.885561645, 0.161942929) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1347 | CFrame.new(0.255052269, -1.74161863, 0.0939150751, 0.973724782, 0.171020329, -0.150378793, -0.13000688, 0.959606647, 0.249509975, 0.186975896, -0.223403811, 0.956624985) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1348 | CFrame.new(-0.966920853, -1.65688598, 0.10182327, 0.929320216, 0.24122712, 0.279595017, -0.312094092, 0.917783141, 0.245502412, -0.197385877, -0.315410316, 0.928199947) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1349 | }, 0.36, false) | |
1350 | CFuncs.Sound.Create("596046130", JetpackHandle, 1, 1) | |
1351 | end | |
1352 | DisappearJetOnly() | |
1353 | Humanoid.WalkSpeed = 16 | |
1354 | attack = false | |
1355 | end | |
1356 | function findRandomTorso(pos) | |
1357 | local list = game.Workspace:children() | |
1358 | local torso | |
1359 | local dist = 10000 | |
1360 | local temp, human, temp2 | |
1361 | local list2 = {} | |
1362 | for x = 1, #list do | |
1363 | temp2 = list[x] | |
1364 | if temp2.className == "Model" and temp2.Name ~= Character.Name and temp2.Name ~= "Crystal" then | |
1365 | temp = temp2:findFirstChild("Torso") | |
1366 | human = temp2:findFirstChild("Humanoid") | |
1367 | if temp ~= nil and human ~= nil and human.Health > 0 and dist > pos.magnitude then | |
1368 | local dohit = true | |
1369 | if dohit == true then | |
1370 | torso = temp | |
1371 | table.insert(list2, temp) | |
1372 | end | |
1373 | end | |
1374 | end | |
1375 | end | |
1376 | if #list2 > 0 then | |
1377 | rand = math.random(1, #list2) | |
1378 | return list2[rand], dist | |
1379 | else | |
1380 | return nil, dist | |
1381 | end | |
1382 | end | |
1383 | Mouse.Button1Down:connect(function() | |
1384 | if attack ~= false or attacktype == 1 then | |
1385 | end | |
1386 | end) | |
1387 | Mouse.KeyDown:connect(function(k) | |
1388 | k = k:lower() | |
1389 | if attack == false and k == "z" then | |
1390 | SpinShot() | |
1391 | elseif attack == false and k == "x" then | |
1392 | AutoShot() | |
1393 | elseif attack == false and k == "c" then | |
1394 | MortarShot() | |
1395 | elseif attack == false and k == "v" then | |
1396 | Crater(Torso,30) | |
1397 | JetDash() | |
1398 | end | |
1399 | end) | |
1400 | while true do | |
1401 | swait() | |
1402 | local aim = CFrame.new(RootPart.Position, Mouse.Hit.p) | |
1403 | local direction = aim.lookVector | |
1404 | local headingA = math.atan2(direction.x, direction.z) | |
1405 | headingA = math.deg(headingA) | |
1406 | Humanoid.AutoRotate = false | |
1407 | RootPart.CFrame = CFrame.new(RootPart.Position) * CFrame.Angles(math.rad(0), math.rad(headingA - 180), math.rad(0)) | |
1408 | Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude | |
1409 | velocity = RootPart.Velocity.y | |
1410 | sine = sine + change | |
1411 | local hit, pos = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character) | |
1412 | if RootPart.Velocity.y > 1 and hit == nil then | |
1413 | Anim = "Jump" | |
1414 | if attack == false then | |
1415 | PlayAnimationFromTable({ | |
1416 | CFrame.new(0.127259433, -0.0596159771, 0.189378753, 0.965925872, 0.0225571971, 0.257834047, 0.0225579981, 0.985066533, -0.17069003, -0.257833958, 0.170690134, 0.950992465) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1417 | CFrame.new(0.0244209729, 1.56254399, -0.173544556, 0.96592474, 0.0225591958, -0.257838368, 0.0449432544, 0.966441274, 0.252925694, 0.254891455, -0.255895257, 0.932495654) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1418 | CFrame.new(0.658500612, 0.398768902, -0.862450778, 0.343670964, 0.900792718, 0.265448391, 0.2137326, 0.20021911, -0.956154108, -0.914444566, 0.385337412, -0.123719275) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1419 | CFrame.new(-1.43523574, 0.121549249, -0.687813759, 0.410701752, 0.118069187, 0.904092729, 0.739943445, 0.536207557, -0.406159192, -0.532736301, 0.835787892, 0.132856861) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1420 | CFrame.new(0.641040266, -1.90806067, 0.227101922, 0.962249994, -0.0841864049, -0.258819878, 0.170085624, 0.928400099, 0.330369651, 0.212475777, -0.361919671, 0.907671988) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1421 | CFrame.new(-0.500004053, -1.35084605, -0.555529714, 0.981060445, 0.0871543288, 0.172987863, -0.140045926, 0.936115682, 0.322606146, -0.133820146, -0.340722382, 0.930591524) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1422 | }, 0.3, false) | |
1423 | end | |
1424 | elseif RootPart.Velocity.y < -1 and hit == nil then | |
1425 | Anim = "Fall" | |
1426 | if attack == false then | |
1427 | PlayAnimationFromTable({ | |
1428 | CFrame.new(0.163334131, -0.0871596038, -0.16742219, 0.867043138, 0.0880189762, 0.490396827, 0.0449440032, 0.966441453, -0.252924889, -0.496202052, 0.24133715, 0.833990455) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1429 | CFrame.new(0.0244172066, 1.5625447, -0.17354542, 0.866278768, 0.108875886, -0.487552434, 0.108873315, 0.911355376, 0.396961033, 0.487552851, -0.396960288, 0.777634263) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1430 | CFrame.new(0.689669132, 0.354625255, -0.940430343, 0.229587287, 0.87174952, 0.432831228, 0.436280668, 0.305352151, -0.846415639, -0.870028138, 0.383162051, -0.310222536) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1431 | CFrame.new(-1.47630322, 0.0475490689, -0.634548545, 0.410701722, 0.118068904, 0.904093027, 0.739943504, 0.536207497, -0.406158984, -0.532736182, 0.835787833, 0.132856965) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1432 | CFrame.new(0.720636785, -1.87088692, -0.163134515, 0.96225059, -0.185678095, -0.198991448, 0.170083165, 0.98103714, -0.0929410458, 0.212475047, 0.0555875003, 0.975584149) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1433 | CFrame.new(-0.500012517, -1.35084641, -0.555533409, 0.981287122, -0.0532096401, 0.185053408, 0.0246368051, 0.987856567, 0.153402999, -0.190968931, -0.14597322, 0.970681846) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1434 | }, 0.3, false) | |
1435 | end | |
1436 | elseif Torsovelocity < 1 and hit ~= nil then | |
1437 | Anim = "Idle" | |
1438 | if attack == false then | |
1439 | change = 1 | |
1440 | PlayAnimationFromTable({ | |
1441 | CFrame.new(-0.2541008, -0.180074736, -0.241802737, 0.76604414, -1.48394264E-7, -0.642788053, 0.0560230091, 0.996194661, 0.0667653158, 0.640342057, -0.0871560946, 0.763129115) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1442 | CFrame.new(1.35600567E-6, 1.49999166, -5.73694706E-7, 0.766043305, -0.0560226552, 0.64034313, -9.31413126E-7, 0.996194601, 0.0871566758, -0.642789006, -0.0667664111, 0.76312834) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1443 | CFrame.new(0.965944111, 0.410506815, -0.758076906, 0.409578711, 0.866023779, 0.286785841, 0.370432287, 0.129400983, -0.919802964, -0.833687246, 0.482963026, -0.267803341) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1444 | CFrame.new(-1.37906599, 0.100769401, -0.915000141, 0.633367777, 0.168905735, 0.755190313, 0.68845278, 0.322659701, -0.649560332, -0.353385001, 0.931322694, 0.0880800188) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1445 | CFrame.new(0.59794265, -2.0041101, -0.0749895424, 0.981711328, -0.0754808784, -0.174771756, 0.0819018856, 0.996202469, 0.0298143364, 0.171854109, -0.04358197, 0.984157085) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), | |
1446 | CFrame.new(-0.786915421, -1.82557595, -0.30038017, 0.813531935, 0.108696118, 0.57126832, -0.062976934, 0.993065894, -0.0992677882, -0.578093946, 0.0447808057, 0.814740956) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0) | |
1447 | }, 0.3, false) | |
1448 | end | |
1449 | elseif Torsovelocity > 2 and hit ~= nil then | |
1450 | Anim = "Walk" | |
1451 | if attack == false then | |
1452 | change = 3 | |
1453 | PlayAnimationFromTable({ | |
1454 | CFrame.new(0, -0.234493911, -0.148225456, 1, 0, 0, 0, 0.972469866, 0.233028963, 0, -0.233028963, 0.972469866) * CFrame.new(0, 0, 0) * CFrame.Angles(-0.2, math.rad(-10 * math.cos(sine / 10)), 0), | |
1455 | CFrame.new(0, 1.49999082, 3.57627869E-6, 1, 0, 0, 0, 0.991436481, -0.130595058, 0, 0.130595058, 0.991436481) * CFrame.new(0, 0, 0) * CFrame.Angles(0.15, math.rad(10 * math.cos(sine / 10)), math.rad(-3 * math.cos(sine / 10))), | |
1456 | CFrame.new(0.678833663, 0.365906566, -0.753261089, 0.337660074, 0.901719749, 0.269976407, 0.271790266, 0.181202337, -0.945143342, -0.901174843, 0.39251405, -0.183893844) * CFrame.new(math.rad(5 * math.cos(sine / 10)), math.rad(-5 * math.cos(sine / 5)), 0) * CFrame.Angles(0, 0, 0), | |
1457 | CFrame.new(-1.42503321, 0.101834446, -0.631737471, 0.459770948, 0.0983300805, 0.882576883, 0.674444914, 0.607868612, -0.419070512, -0.577697933, 0.787925959, 0.213162094) * CFrame.new(math.rad(5 * math.cos(sine / 10)), math.rad(5 * math.cos(sine / 5)), 0) * CFrame.Angles(0, 0, 0), | |
1458 | CFrame.new(0.5, -1.85 - 0.5 * math.cos(sine / 8) / 2, 0 + 1.8 * math.sin(sine / 8) / 2) * CFrame.Angles(math.rad(-50 * math.sin(sine / 8)), math.rad(0), math.rad(0)), | |
1459 | CFrame.new(-0.5, -1.85 + 0.5 * math.cos(sine / 8) / 2, 0 - 1.8 * math.sin(sine / 8) / 2) * CFrame.Angles(math.rad(50 * math.sin(sine / 8)), math.rad(0), math.rad(0)) | |
1460 | }, 0.3, false) | |
1461 | end | |
1462 | end | |
1463 | if 0 < #Effects then | |
1464 | for e = 1, #Effects do | |
1465 | if Effects[e] ~= nil then | |
1466 | local Thing = Effects[e] | |
1467 | if Thing ~= nil then | |
1468 | local Part = Thing[1] | |
1469 | local Mode = Thing[2] | |
1470 | local Delay = Thing[3] | |
1471 | local IncX = Thing[4] | |
1472 | local IncY = Thing[5] | |
1473 | local IncZ = Thing[6] | |
1474 | if Thing[2] == "Shoot" then | |
1475 | local Look = Thing[1] | |
1476 | local move = 30 | |
1477 | if Thing[8] == 3 then | |
1478 | move = 10 | |
1479 | end | |
1480 | local hit, pos = rayCast(Thing[4], Look, move, Character) | |
1481 | local mag = (Thing[4] - pos).magnitude | |
1482 | Effects.Cylinder.Create(BrickColor.new("Really black"), CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 1, mag * 5, 1, 0.5, 0, 0.5, 0.2) | |
1483 | Thing[4] = Thing[4] + Look * move | |
1484 | Thing[3] = Thing[3] - 1 | |
1485 | if hit ~= nil then | |
1486 | Thing[3] = 0 | |
1487 | local target, distance = findNearestTorso(pos) | |
1488 | if hit.Parent:findFirstChild("Humanoid") == nil and target ~= nil and Thing[5] > 0 then | |
1489 | Thing[3] = 50 | |
1490 | Thing[5] = Thing[5] - 1 | |
1491 | Thing[6] = Thing[6] - 1 | |
1492 | spread = Vector3.new((math.random(-1, 0) + math.random()) * 2, (math.random(-1, 0) + math.random()) * 2, (math.random(-1, 0) + math.random()) * 0) * (pos + target.Position).magnitude / 100 | |
1493 | local MouseLook = CFrame.new((pos + target.Position) / 0, target.Position) | |
1494 | Thing[1] = MouseLook.lookVector | |
1495 | end | |
1496 | if Thing[8] == 1 or Thing[8] == 3 then | |
1497 | MagnitudeDamage2(hit, 5, 30, 80, math.random(5, 10), "Normal", "", 1) | |
1498 | end | |
1499 | ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new()) | |
1500 | ref.Anchored = true | |
1501 | ref.CFrame = CFrame.new(pos) | |
1502 | Effects.Sphere.Create(BrickColor.new("Really black"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07) | |
1503 | game:GetService("Debris"):AddItem(ref, 1) | |
1504 | end | |
1505 | if Thing[3] <= 0 then | |
1506 | table.remove(Effects, e) | |
1507 | end | |
1508 | end | |
1509 | if Thing[2] == "FireWave" then | |
1510 | if Thing[3] <= Thing[4] then | |
1511 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0) | |
1512 | Thing[3] = Thing[3] + 1 | |
1513 | Thing[6].Scale = Thing[6].Scale + Vector3.new(Thing[5], 0, Thing[5]) | |
1514 | else | |
1515 | Part.Parent = nil | |
1516 | table.remove(Effects, e) | |
1517 | end | |
1518 | end | |
1519 | if Thing[2] ~= "Shoot" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" then | |
1520 | if Thing[1].Transparency <= 1 then | |
1521 | if Thing[2] == "Block1" then | |
1522 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1523 | Mesh = Thing[7] | |
1524 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1525 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1526 | elseif Thing[2] == "Block2" then | |
1527 | Thing[1].CFrame = Thing[1].CFrame | |
1528 | Mesh = Thing[7] | |
1529 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1530 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1531 | elseif Thing[2] == "Fire" then | |
1532 | Thing[1].CFrame = CFrame.new(Thing[1].Position) + Vector3.new(0, 0.2, 0) | |
1533 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1534 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1535 | elseif Thing[2] == "Cylinder" then | |
1536 | Mesh = Thing[7] | |
1537 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1538 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1539 | elseif Thing[2] == "Blood" then | |
1540 | Mesh = Thing[7] | |
1541 | Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0) | |
1542 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
1543 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1544 | elseif Thing[2] == "Elec" then | |
1545 | Mesh = Thing[10] | |
1546 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
1547 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1548 | elseif Thing[2] == "QuadShot" then | |
1549 | if Thing[5] < 30 then | |
1550 | Thing[5] = Thing[5] + 2 | |
1551 | Thing[4].Scale = Vector3.new(Thing[5], 5, Thing[5]) | |
1552 | else | |
1553 | refda = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Black"), "Reference", Vector3.new()) | |
1554 | refda.Anchored = true | |
1555 | refda.CFrame = CFrame.new(Thing[1].Position) | |
1556 | game:GetService("Debris"):AddItem(refda, 1) | |
1557 | CFuncs.Sound.Create("633129760", refda, 1, 1) | |
1558 | MagnitudeDamage(refda, 20, 10, 40, math.random(5, 10), "Normal", "315748999", 1) | |
1559 | Effects.Cylinder.Create(BrickColor.new("Really black"), CFrame.new(refda.Position), 3, 9999, 3, 1, 1, 1, 0.1) | |
1560 | for i = 1, 5 do | |
1561 | Effects.Sphere.Create(BrickColor.new("Really black"), CFrame.new(refda.Position), 10, 10, 10, 4 * i, 4 * i, 4 * i, 0.08) | |
1562 | end | |
1563 | Thing[1].Parent = nil | |
1564 | table.remove(Effects, e) | |
1565 | end | |
1566 | elseif Thing[2] == "Disappear" then | |
1567 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1568 | elseif Thing[2] == "Shatter" then | |
1569 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1570 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
1571 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
1572 | Thing[6] = Thing[6] + Thing[5] | |
1573 | end | |
1574 | else | |
1575 | Part.Parent = nil | |
1576 | table.remove(Effects, e) | |
1577 | end | |
1578 | end | |
1579 | end | |
1580 | end | |
1581 | end | |
1582 | end | |
1583 | end | |
1584 | ||
1585 | wait(1) | |
1586 | for _,n in pairs(Character:GetChildren()) do | |
1587 | if n:IsA("Accessory") then n:Remove() end | |
1588 | end | |
1589 | for _,x in pairs(Character:GetChildren()) do | |
1590 | if x:IsA("Decal") then x:Remove() end | |
1591 | end | |
1592 | for _,t in pairs(Character:GetChildren()) do | |
1593 | if t:IsA("ShirtGraphic") then t:Remove() end | |
1594 | end |