SHOW:
|
|
- or go back to the newest paste.
1 | print([[ | |
2 | ___________________________________ | |
3 | ||
4 | - | Kyutatsuki13's アマツミカ·スタライト script |
4 | + | Kyutatsuki13's script |
5 | Build 0003 | |
6 | Amatsumika Starlight the Kami of Stars | |
7 | ||
8 | ___________________________________ | |
9 | ]]) | |
10 | ||
11 | function checkfriendlist(model) | |
12 | local friend = false | |
13 | local target = nil | |
14 | if model.ClassName == "Player" then | |
15 | target = model | |
16 | else | |
17 | target = game:GetService("Players"):GetPlayerFromCharacter(model) | |
18 | end | |
19 | if target ~= nil then | |
20 | if target:IsFriendsWith(40229938) then friend = true end | |
21 | end | |
22 | return friend | |
23 | end | |
24 | ||
25 | if checkfriendlist(game:GetService("Players").LocalPlayer) == false and not game:GetService("Players").LocalPlayer:FindFirstChild("Kyu's Temp Whitelist") then | |
26 | warn("You're not whitelisted h0h but since i released it") | |
27 | --wait(1) | |
28 | --error("Script has been stopped.") | |
29 | end | |
30 | ||
31 | warn("You're whitelisted, "..game:GetService("Players").LocalPlayer.Name.." :)") | |
32 | ||
33 | local p = game:GetService("Players").LocalPlayer | |
34 | local plr = game:GetService("Players").LocalPlayer | |
35 | local player = game:GetService("Players").LocalPlayer | |
36 | local char = p.Character | |
37 | local mouse = p:GetMouse() | |
38 | local larm = char:WaitForChild("Left Arm") | |
39 | local rarm = char:WaitForChild("Right Arm") | |
40 | local lleg = char:WaitForChild("Left Leg") | |
41 | local rleg = char:WaitForChild("Right Leg") | |
42 | local hed = char:WaitForChild("Head") | |
43 | local torso = char:WaitForChild("Torso") | |
44 | local root = char:WaitForChild("HumanoidRootPart") | |
45 | local hum = char:FindFirstChildOfClass("Humanoid") | |
46 | local debris = game:GetService("Debris") | |
47 | local run = game:GetService("RunService") | |
48 | local rs = run.RenderStepped | |
49 | local cam = workspace.CurrentCamera | |
50 | local movement = 4 | |
51 | local change = 0.4 | |
52 | local DebrisModel = Instance.new("Model",char) | |
53 | local stealth = false | |
54 | local debounce = false | |
55 | hum.MaxHealth = 50000 | |
56 | hum.Health = hum.MaxHealth | |
57 | - | themeid = 556122490 |
57 | + | themeid = 281705379 |
58 | themepitch = 1 | |
59 | main = {r = 0;g = 100;b = 255;v = 1} | |
60 | if p:FindFirstChild("rcolor") then main.r = p.rcolor.Value else local string = Instance.new("StringValue",p) string.Name = "rcolor" end | |
61 | if p:FindFirstChild("gcolor") then main.g = p.gcolor.Value else local string = Instance.new("StringValue",p) string.Name = "gcolor" end | |
62 | if p:FindFirstChild("bcolor") then main.b = p.bcolor.Value else local string = Instance.new("StringValue",p) string.Name = "bcolor" end | |
63 | if p:FindFirstChild("vcolor") then main.v = p.vcolor.Value else local string = Instance.new("StringValue",p) string.Name = "vcolor" end | |
64 | if p:FindFirstChild("idtheme") then themeid = p.idtheme.Value else local string = Instance.new("StringValue",p) string.Name = "idtheme" end | |
65 | if p:FindFirstChild("pitchtheme") then themepitch = p.pitchtheme.Value else local string = Instance.new("StringValue",p) string.Name = "pitchtheme" end | |
66 | pr = p:FindFirstChild("rcolor") | |
67 | pg = p:FindFirstChild("gcolor") | |
68 | pb = p:FindFirstChild("bcolor") | |
69 | pv = p:FindFirstChild("vcolor") | |
70 | idth = p:FindFirstChild("idtheme") | |
71 | pith = p:FindFirstChild("pitchtheme") | |
72 | main_color = Color3.fromRGB(main.r,main.g,main.b) | |
73 | explosionid = {262562442,144699494,539294959,1388740053} | |
74 | --919941001 | |
75 | Prefix = "/" | |
76 | p.Chatted:connect(function(msg) | |
77 | ||
78 | if msg:lower():sub(1,#Prefix+#'color r ')==Prefix..'color r ' then | |
79 | local v = tonumber(msg:sub(#Prefix+#'color r '+1)) | |
80 | main.r = v | |
81 | elseif msg:lower():sub(1,#Prefix+#'color g ')==Prefix..'color g ' then | |
82 | local v = tonumber(msg:sub(#Prefix+#'color g '+1)) | |
83 | main.g = v | |
84 | elseif msg:lower():sub(1,#Prefix+#'color b ')==Prefix..'color b ' then | |
85 | local v = tonumber(msg:sub(#Prefix+#'color b '+1)) | |
86 | main.b = v | |
87 | elseif msg:lower():sub(1,#Prefix+#'color v ')==Prefix..'color v ' then | |
88 | local v = tonumber(msg:sub(#Prefix+#'color v '+1)) | |
89 | if v > 1 then main.v = 1 elseif v < -1 then main.v = -1 else main.v = v end | |
90 | ||
91 | elseif msg:lower():sub(1,#Prefix+#'theme ')==Prefix..'theme ' then | |
92 | local v = tonumber(msg:sub(#Prefix+#'theme '+1)) | |
93 | themeid = v | |
94 | music(themeid,themepitch) | |
95 | ||
96 | elseif msg:lower():sub(1,#Prefix+#'pitch ')==Prefix..'pitch ' then | |
97 | local v = tonumber(msg:sub(#Prefix+#'pitch '+1)) | |
98 | themepitch = v | |
99 | music(themeid,themepitch) | |
100 | ||
101 | elseif msg:lower():sub(1,#Prefix+#'prefix ')==Prefix..'prefix ' then | |
102 | local v = msg:sub(#Prefix+#'prefix '+1) | |
103 | Prefix = v | |
104 | ||
105 | elseif msg:lower():sub(1,#Prefix+#'reset')==Prefix..'reset' then | |
106 | main.r = 0 | |
107 | main.g = 100 | |
108 | main.b = 255 | |
109 | main.v = 1 | |
110 | - | themeid = 556122490 |
110 | + | themeid = 281705379 |
111 | themepitch = 1 | |
112 | music(themeid,themepitch) | |
113 | ||
114 | end | |
115 | ||
116 | end) | |
117 | ---------------------------------------------------------------------------- | |
118 | no_anim = false | |
119 | attack = false | |
120 | attacking = false | |
121 | canjump = true | |
122 | aiming_anim = false | |
123 | animid = math.random(0,1) | |
124 | timer = 0 | |
125 | bg = Instance.new("BodyGyro",root) | |
126 | bg.P = 100000 | |
127 | bg.D = 100 | |
128 | ---------------------------------------------------------------------------- | |
129 | ||
130 | function rswait(value) | |
131 | if value ~= nil and value ~= 0 then | |
132 | for i=1,value do | |
133 | rs:wait() | |
134 | end | |
135 | else | |
136 | rs:wait() | |
137 | end | |
138 | end | |
139 | ||
140 | ---------------------------------------------------------------------------- | |
141 | max = 0 | |
142 | function music(id,pitch) | |
143 | max = 0 | |
144 | if id == "Stop" then | |
145 | if not torso:FindFirstChild("MusicRuin") then | |
146 | soundz = Instance.new("Sound",torso) | |
147 | end | |
148 | soundz:Stop() | |
149 | else | |
150 | if not torso:FindFirstChild("MusicRuin") then | |
151 | soundz = Instance.new("Sound",torso) | |
152 | end | |
153 | soundz.MaxDistance = 150*5 | |
154 | soundz.EmitterSize = 150/5 | |
155 | soundz.Volume = 10 | |
156 | soundz.Name = "MusicRuin" | |
157 | soundz.Looped = true | |
158 | soundz.PlaybackSpeed = pitch | |
159 | soundz.SoundId = "rbxassetid://"..id | |
160 | soundz:Stop() | |
161 | soundz:Play() | |
162 | end | |
163 | end | |
164 | ||
165 | ---------------------------------------------------------------------------- | |
166 | ||
167 | function lerp(a, b, t) | |
168 | return a + (b - a)*t | |
169 | end | |
170 | ||
171 | ---------------------------------------------------------------------------- | |
172 | ||
173 | function Lerp(c1,c2,al) | |
174 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()} | |
175 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()} | |
176 | for i,v in pairs(com1) do | |
177 | com1[i] = v+(com2[i]-v)*al | |
178 | end | |
179 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
180 | end | |
181 | ||
182 | ---------------------------------------------------------------------------- | |
183 | ||
184 | function slerp(a, b, t) | |
185 | dot = a:Dot(b) | |
186 | if dot > 0.99999 or dot < -0.99999 then | |
187 | return t <= 0.5 and a or b | |
188 | else | |
189 | r = math.acos(dot) | |
190 | return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r) | |
191 | end | |
192 | end | |
193 | ||
194 | ---------------------------------------------------------------------------- | |
195 | ||
196 | function clerp(c1,c2,al) | |
197 | ||
198 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()} | |
199 | ||
200 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()} | |
201 | ||
202 | for i,v in pairs(com1) do | |
203 | ||
204 | com1[i] = lerp(v,com2[i],al) | |
205 | ||
206 | end | |
207 | ||
208 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
209 | ||
210 | end | |
211 | ||
212 | ---------------------------------------------------------------------------- | |
213 | ||
214 | function findAllNearestTorso(pos,dist) | |
215 | local list = game.Workspace:children() | |
216 | local torso = {} | |
217 | local temp = nil | |
218 | local human = nil | |
219 | local temp2 = nil | |
220 | for x = 1, #list do | |
221 | temp2 = list[x] | |
222 | if (temp2.className == "Model") and (temp2 ~= char) then | |
223 | local nayem = "Torso" | |
224 | if temp2:findFirstChild("UpperTorso") then nayem = "UpperTorso" end | |
225 | temp = temp2:findFirstChild(nayem) | |
226 | human = temp2:findFirstChildOfClass("Humanoid") | |
227 | if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then | |
228 | if (temp.Position - pos).magnitude < dist then | |
229 | table.insert(torso,temp) | |
230 | dist = (temp.Position - pos).magnitude | |
231 | end | |
232 | end | |
233 | end | |
234 | end | |
235 | return torso | |
236 | end | |
237 | ||
238 | ---------------------------------------------------------------------------- | |
239 | ||
240 | local isAPlayer | |
241 | function checkIfNotPlayer(model) | |
242 | coroutine.resume(coroutine.create(function() | |
243 | if model ~= char and model.Parent ~= char and model.Parent.Parent ~= char and model.Parent ~= DebrisModel and model.Parent.Parent ~= DebrisModel and model.Parent.Parent.Parent ~= DebrisModel then | |
244 | isAPlayer = true | |
245 | else | |
246 | isAPlayer = false | |
247 | end | |
248 | end)) | |
249 | return isAPlayer | |
250 | end | |
251 | ||
252 | ---------------------------------------------------------------------------- | |
253 | ||
254 | function computeDirection(vec) | |
255 | local lenSquared = vec.magnitude * vec.magnitude | |
256 | local invSqrt = 1 / math.sqrt(lenSquared) | |
257 | return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt) | |
258 | end | |
259 | ||
260 | ---------------------------------------------------------------------------- | |
261 | ||
262 | function newWeld(wp0, wp1, wc0x, wc0y, wc0z) | |
263 | ||
264 | local wld = Instance.new("Weld", wp1) | |
265 | ||
266 | wld.Part0 = wp0 | |
267 | ||
268 | wld.Part1 = wp1 | |
269 | ||
270 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
271 | ||
272 | return wld | |
273 | ||
274 | end | |
275 | ||
276 | ---------------------------------------------------------------------------- | |
277 | ||
278 | function weld(model) | |
279 | local parts,last = {} | |
280 | local function scan(parent) | |
281 | for _,v in pairs(parent:GetChildren()) do | |
282 | if (v:IsA("BasePart")) then | |
283 | if (last) then | |
284 | local w = Instance.new("Weld") | |
285 | w.Name = ("%s_Weld"):format(v.Name) | |
286 | w.Part0,w.Part1 = last,v | |
287 | w.C0 = last.CFrame:inverse() | |
288 | w.C1 = v.CFrame:inverse() | |
289 | w.Parent = last | |
290 | end | |
291 | last = v | |
292 | table.insert(parts,v) | |
293 | end | |
294 | scan(v) | |
295 | end | |
296 | end | |
297 | scan(model) | |
298 | for _,v in pairs(parts) do | |
299 | v.Anchored = false | |
300 | v.Locked = true | |
301 | end | |
302 | end | |
303 | ||
304 | ---------------------------------------------------------------------------- | |
305 | ||
306 | function sound(id,position,vol,pitch,dist,start,finish) | |
307 | coroutine.resume(coroutine.create(function() | |
308 | ||
309 | local part = Instance.new("Part",DebrisModel) | |
310 | part.Anchored = true | |
311 | part.Position = position | |
312 | part.Size = Vector3.new(0,0,0) | |
313 | part.CanCollide = false | |
314 | part.Transparency = 1 | |
315 | ||
316 | soundasd = Instance.new("Sound",part) | |
317 | ||
318 | soundasd.SoundId = "rbxassetid://"..id | |
319 | ||
320 | if vol ~= nil then | |
321 | soundasd.Volume = vol | |
322 | end | |
323 | ||
324 | if pitch ~= nil then | |
325 | soundasd.PlaybackSpeed = pitch | |
326 | end | |
327 | ||
328 | if dist ~= nil then | |
329 | soundasd.MaxDistance = dist*5 | |
330 | soundasd.EmitterSize = dist/5 | |
331 | end | |
332 | ||
333 | delay(0.5,function() debris:AddItem(part,soundasd.TimeLength+3) end) | |
334 | ||
335 | soundasd:Play() | |
336 | ||
337 | end)) | |
338 | return soundasd | |
339 | end | |
340 | ||
341 | function createsound(id,parent) | |
342 | ||
343 | local soundz = Instance.new("Sound",parent) | |
344 | ||
345 | soundz.SoundId = "rbxassetid://"..id | |
346 | ||
347 | return soundz | |
348 | ||
349 | end | |
350 | ||
351 | function playsound(sond,vol,pitch,start) | |
352 | ||
353 | if vol ~= nil then | |
354 | sond.Volume = vol | |
355 | end | |
356 | ||
357 | if pitch ~= nil then | |
358 | sond.PlaybackSpeed = pitch | |
359 | end | |
360 | ||
361 | if start ~= nil then | |
362 | sond.TimePosition = start | |
363 | end | |
364 | ||
365 | sond:Play() | |
366 | ||
367 | end | |
368 | ||
369 | ---------------------------------------------------------------------------- | |
370 | eColors={"Really red","Really black"} | |
371 | function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans) | |
372 | local magz = (Part0 - Part1).magnitude | |
373 | local curpos = Part0 | |
374 | local trz = {-Offset,Offset} | |
375 | for i=1,Times do | |
376 | local li = Instance.new("Part", DebrisModel) | |
377 | li.TopSurface =0 | |
378 | li.Material = Enum.Material.Neon | |
379 | li.BottomSurface = 0 | |
380 | li.Anchored = true | |
381 | li.Locked = true | |
382 | li.Transparency = Trans or 0.4 | |
383 | li.BrickColor = BrickColor.new(Color) | |
384 | li.formFactor = "Custom" | |
385 | li.CanCollide = false | |
386 | li.Size = Vector3.new(Thickness,Thickness,magz/Times) | |
387 | local lim = Instance.new("BlockMesh",li) | |
388 | local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
389 | local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet | |
390 | if Times == i then | |
391 | local magz2 = (curpos - Part1).magnitude | |
392 | li.Size = Vector3.new(Thickness,Thickness,magz2) | |
393 | li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2) | |
394 | else | |
395 | li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2) | |
396 | end | |
397 | curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p | |
398 | li.Name = "LIGHTNING" | |
399 | end | |
400 | end | |
401 | ||
402 | ---------------------------------------------------------------------------- | |
403 | ||
404 | local HBill = Instance.new("BillboardGui",hed) | |
405 | local HMain, HBar = Instance.new("Frame", HBill), Instance.new("Frame") | |
406 | local HName = Instance.new("TextLabel") | |
407 | HBill.Size = UDim2.new(15,0,2.2,0) | |
408 | - | HBill.StudsOffset = Vector3.new(3.675,1.2,0) |
408 | + | |
409 | HBill.AlwaysOnTop = true | |
410 | HBill.Enabled = true | |
411 | HMain.BackgroundColor3 = Color3.new(0, 0, 0) | |
412 | HMain.BackgroundTransparency = 1 | |
413 | - | HMain.Size = UDim2.new(.5,0,.2,0) |
413 | + | |
414 | HName.Parent = HMain | |
415 | HName.BackgroundTransparency = 1 | |
416 | HName.BackgroundColor3 = Color3.new(255,255,255) | |
417 | HName.BorderColor3 = Color3.new(0,0,0) | |
418 | HName.BorderSizePixel = 2 | |
419 | HName.Size = UDim2.new(1,0,.75,0) | |
420 | HName.Font = "Code" | |
421 | - | HName.Text = [[(Amatsumika Starlight)]] |
421 | + | HName.Text = [[Blue Fire Natsu]] |
422 | HName.TextScaled = true | |
423 | - | HName.TextColor3 = Color3.new(0.5,0.5,0.5) |
423 | + | |
424 | - | HName.TextStrokeColor3 = Color3.new(0.1,0.1,0.1) |
424 | + | |
425 | HName.TextStrokeTransparency = 0 | |
426 | HName.TextYAlignment = "Bottom" | |
427 | ||
428 | function bigboomrektxd() | |
429 | coroutine.resume(coroutine.create(function() | |
430 | local magnitude = nil | |
431 | local Position = nil | |
432 | if animid == 0 then | |
433 | Position = larm.Position | |
434 | else | |
435 | Position = rarm.Position | |
436 | end | |
437 | --sound(743499393,Position,10,math.random(6,8)/10) | |
438 | sound(440145223,Position,10,math.random(10,12)/10,50) | |
439 | ||
440 | local Part1 = Instance.new("Part") | |
441 | local mesh2 = Instance.new("SpecialMesh",Part1) | |
442 | mesh2.MeshId = "rbxassetid://559831844" | |
443 | mesh2.Scale = Vector3.new(0,0,0.4) | |
444 | Part1.Material = Enum.Material.Neon | |
445 | - | HName.Text = [[「アマツミカ·スタライト」]] |
445 | + | |
446 | Part1.Color = Color3.fromHSV(0,0,main.v) | |
447 | Part1.Parent = DebrisModel | |
448 | Part1.Size = Vector3.new(0,0,0) | |
449 | Part1.Anchored = true | |
450 | Part1.CFrame = CFrame.new(Position,mouse.Hit.p) | |
451 | Part1.Name = "EXPLOSION2" | |
452 | ||
453 | local Part0 = Instance.new("Part",DebrisModel) | |
454 | local PointLight2 = Instance.new("PointLight") | |
455 | Part0.Name = "Bullet" | |
456 | Part0.Material = Enum.Material.Neon | |
457 | Part0.Color = Color3.fromHSV(0,0,main.v) | |
458 | Part0.Anchored = false | |
459 | Part0.Size = Vector3.new(5, 5, 5) | |
460 | local mesh = Instance.new("SpecialMesh",Part0) | |
461 | mesh.MeshType = Enum.MeshType.Sphere | |
462 | local bforce = Instance.new("BodyForce",Part0) | |
463 | bforce.force = Vector3.new(0, ((bforce.Parent:getMass())*workspace.Gravity), 0) | |
464 | Part0.CanCollide = false | |
465 | PointLight2.Parent = Part0 | |
466 | PointLight2.Color = Part0.Color | |
467 | local Target = mouse.Hit.p | |
468 | local direction = Target - Position | |
469 | local direction = computeDirection(direction) | |
470 | local pos = Position + (direction * 2) | |
471 | Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
472 | Part0.Velocity = direction * 60 | |
473 | local asd = nil | |
474 | local loop = nil | |
475 | delay(5, function() Part0:Destroy() loop:disconnect() asd:disconnect() end) | |
476 | loop = rs:connect(function() | |
477 | local asdf = math.random(500,1000)/1000 | |
478 | local Part1 = Instance.new("Part") | |
479 | local mesh2 = Instance.new("SpecialMesh",Part1) | |
480 | mesh2.MeshType = Enum.MeshType.Sphere | |
481 | Part1.Material = Enum.Material.Neon | |
482 | Part1.CanCollide = false | |
483 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
484 | Part1.Parent = DebrisModel | |
485 | Part1.Size = Part0.Size + Vector3.new(asdf,asdf,asdf) | |
486 | Part1.Anchored = true | |
487 | Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-1000,1000)/750,math.random(-1000,1000)/750,math.random(-1000,1000)/750)) | |
488 | Part1.Name = "SMOKE" | |
489 | end) | |
490 | asd = Part0.Touched:connect(function(ht) | |
491 | local hit=ht.Parent | |
492 | if checkIfNotPlayer(ht) == true and ht.CanCollide == true then | |
493 | asd:disconnect() | |
494 | loop:disconnect() | |
495 | Part0:Destroy() | |
496 | ||
497 | sound(explosionid[math.random(1,#explosionid)],Part0.Position,10,math.random(6,9)/10,200) | |
498 | for i,v in pairs(findAllNearestTorso(Part0.Position,50)) do | |
499 | if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then | |
500 | v:Destroy() | |
501 | else | |
502 | v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/(math.random(50,60)/10)) | |
503 | end | |
504 | local Position = Part0.Position | |
505 | local Target = v.Position | |
506 | local direction = Target - Position | |
507 | local direction = computeDirection(direction) | |
508 | local bv = Instance.new("BodyVelocity",v) | |
509 | bv.Velocity = direction * (50 - ((Position - Target).magnitude/2)) | |
510 | debris:AddItem(bv,1) | |
511 | end | |
512 | for i=1,14,2 do for x=1,math.random(0,1) do rs:wait() end | |
513 | for z=1,math.random(2,3) do | |
514 | local asdf = math.random(-5,5)*10-(i/20)*8 | |
515 | local Part1 = Instance.new("Part") | |
516 | local mesh2 = Instance.new("SpecialMesh",Part1) | |
517 | mesh2.MeshType = Enum.MeshType.Sphere | |
518 | mesh2.Scale = Vector3.new(0,0,0) | |
519 | Part1.Material = Enum.Material.Neon | |
520 | Part1.CanCollide = false | |
521 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
522 | Part1.Parent = DebrisModel | |
523 | Part1.Size = Vector3.new(asdf,asdf,asdf) | |
524 | Part1.Anchored = true | |
525 | local a = i*0.5 | |
526 | Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-2,2)*a,math.random(-10,10),math.random(-2,2)*a)) | |
527 | Part1.Name = "EXPLOSION" | |
528 | end | |
529 | end | |
530 | ||
531 | end | |
532 | end) | |
533 | end)) | |
534 | end | |
535 | ||
536 | holdclick=false | |
537 | ||
538 | mouse.Button1Down:connect(function() | |
539 | if debounce == false then | |
540 | if animid == 0 then | |
541 | animid = 1 | |
542 | else | |
543 | animid = 0 | |
544 | end | |
545 | debounce = true | |
546 | holdclick = true | |
547 | aiming_anim = true | |
548 | wait(0.2) | |
549 | repeat | |
550 | rs:wait() | |
551 | timer = 150 | |
552 | until holdclick == false | |
553 | bigboomrektxd() | |
554 | ||
555 | local Position = mouse.Hit.p | |
556 | local Target = root.Position | |
557 | local direction = Target - Position | |
558 | local direction = computeDirection(direction) | |
559 | root.Velocity = direction * 150 | |
560 | ||
561 | aiming_anim = false | |
562 | delay(0.3,function() debounce = false end) | |
563 | end | |
564 | end) | |
565 | ||
566 | mouse.Button1Up:connect(function() | |
567 | holdclick=false | |
568 | end) | |
569 | ||
570 | function dashasdf() | |
571 | debounce = true | |
572 | ||
573 | canjump = false | |
574 | attack = true | |
575 | ||
576 | for i,v in pairs(char:GetChildren()) do | |
577 | if v ~= root then | |
578 | if v:IsA("Part") then | |
579 | v.Transparency = 1 | |
580 | elseif v:IsA("Accoutrement") then | |
581 | v:FindFirstChildOfClass("Part").Transparency = 1 | |
582 | end | |
583 | end | |
584 | end | |
585 | ||
586 | local tempattachment = Instance.new("Attachment",root) | |
587 | tempattachment.Position = Vector3.new(0,0,-4) | |
588 | ||
589 | for i=1,20 do rs:wait() | |
590 | root.Velocity = Vector3.new(0,0,0) | |
591 | root.CFrame = CFrame.new(tempattachment.WorldPosition) * CFrame.Angles(math.rad(root.Orientation.X),math.rad(root.Orientation.Y),math.rad(root.Orientation.Z)) | |
592 | local asdf = math.random(500,1000)/100 | |
593 | local Part1 = Instance.new("Part") | |
594 | local mesh2 = Instance.new("SpecialMesh",Part1) | |
595 | mesh2.MeshType = Enum.MeshType.Sphere | |
596 | Part1.Material = Enum.Material.Neon | |
597 | Part1.CanCollide = false | |
598 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
599 | Part1.Parent = DebrisModel | |
600 | Part1.Size = Vector3.new(asdf,asdf,asdf) | |
601 | Part1.Anchored = true | |
602 | Part1.CFrame = CFrame.new(root.Position + Vector3.new(math.random(-1000,1000)/500,math.random(-1000,1000)/500,math.random(-1000,1000)/500)) | |
603 | Part1.Name = "SMOKE" | |
604 | end | |
605 | ||
606 | tempattachment:Destroy() | |
607 | ||
608 | for i,v in pairs(char:GetChildren()) do | |
609 | if v ~= root then | |
610 | if v:IsA("Part") then | |
611 | v.Transparency = 0 | |
612 | elseif v:IsA("Accoutrement") then | |
613 | v:FindFirstChildOfClass("Part").Transparency = 0 | |
614 | end | |
615 | end | |
616 | end | |
617 | ||
618 | canjump = true | |
619 | attack = false | |
620 | ||
621 | delay(0.1,function() debounce = false end) | |
622 | end | |
623 | ||
624 | function laz0r() | |
625 | ||
626 | local Position = nil | |
627 | if animid == 0 then | |
628 | Position = larm.Position | |
629 | else | |
630 | Position = rarm.Position | |
631 | end | |
632 | ||
633 | local Part1 = Instance.new("Part") | |
634 | local mesh2 = Instance.new("SpecialMesh",Part1) | |
635 | mesh2.MeshId = "rbxassetid://559831844" | |
636 | mesh2.Scale = Vector3.new(0,0,0.4) | |
637 | Part1.Material = Enum.Material.Neon | |
638 | Part1.CanCollide = false | |
639 | Part1.Color = Color3.fromHSV(0,0,main.v) | |
640 | Part1.Parent = DebrisModel | |
641 | Part1.Size = Vector3.new(0,0,0) | |
642 | Part1.Anchored = true | |
643 | Part1.CFrame = CFrame.new(Position,mouse.Hit.p) | |
644 | Part1.Name = "EXPLOSION3" | |
645 | ||
646 | local Part0 = Instance.new("Part",DebrisModel) | |
647 | Part0.Name = "Bullet" | |
648 | Part0.Material = Enum.Material.Neon | |
649 | Part0.Color = Color3.fromHSV(0,0,main.v) | |
650 | Part0.Anchored = true | |
651 | local mesh = Instance.new("SpecialMesh",Part0) | |
652 | mesh.MeshType = Enum.MeshType.Sphere | |
653 | Part0.CanCollide = false | |
654 | local Target = mouse.Hit.p | |
655 | local direction = Target - Position | |
656 | local direction = computeDirection(direction) | |
657 | local ray = Ray.new(Position, (Target-Position).unit*1048) | |
658 | local part, endPoint = workspace:FindPartOnRay(ray, char) | |
659 | Part0.Size = Vector3.new(5,1,5) | |
660 | mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude,1) | |
661 | local pos = Position + (direction * (mesh.Scale.Y/2)) | |
662 | Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
663 | ||
664 | clashpart = Instance.new("Part",DebrisModel) | |
665 | clashpart.Size = Vector3.new(50,50,50) | |
666 | clashpart.CanCollide = false | |
667 | clashpart.Anchored = true | |
668 | clashpart.Transparency = 1 | |
669 | clashpart.Color = main_color | |
670 | clashpart.Name = "StarLightClash" | |
671 | clashpart.CFrame = CFrame.new(endPoint, root.Position) | |
672 | ||
673 | sound(1177475476,Position,10,math.random(5,6)/10,300) | |
674 | ||
675 | local z = 10 | |
676 | for i = 1,100 do rs:wait() | |
677 | if animid == 0 then | |
678 | Position = larm.Position | |
679 | else | |
680 | Position = rarm.Position | |
681 | end | |
682 | local Target = mouse.Hit.p | |
683 | local direction = Target - Position | |
684 | local direction = computeDirection(direction) | |
685 | local ray = Ray.new(Position, (Target-Position).unit*1048) | |
686 | local part, endPoint = workspace:FindPartOnRay(ray, char) | |
687 | Part0.Size = Vector3.new(5-((i/100)*5),1,5-((i/100)*5)) | |
688 | mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude,1) | |
689 | mesh.Offset = Vector3.new(math.random(-10000,10000)/20000,math.random(-10000,10000)/20000,0) | |
690 | local pos = Position + (direction * (mesh.Scale.Y/2)) | |
691 | Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
692 | clashpart.CFrame = CFrame.new(endPoint, root.Position) | |
693 | ||
694 | local Position = mouse.Hit.p | |
695 | local Target = root.Position | |
696 | local direction = Target - Position | |
697 | local direction = computeDirection(direction) | |
698 | root.Velocity = direction * 5 | |
699 | ||
700 | if i >= z then z = i + 10 sound(explosionid[math.random(1,#explosionid)],endPoint,10,math.random(6,9)/10,200) end | |
701 | ||
702 | Part1 = Part0:Clone() | |
703 | Part1.Parent = DebrisModel | |
704 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
705 | Part1.Name = "SMOKE2" | |
706 | ||
707 | if part ~= nil then | |
708 | if part.Name == "StarLightClash" then | |
709 | local asdf = math.random(0,5)*20 | |
710 | local Part1 = Instance.new("Part") | |
711 | local mesh2 = Instance.new("SpecialMesh",Part1) | |
712 | mesh2.MeshType = Enum.MeshType.Sphere | |
713 | mesh2.Scale = Vector3.new(0,0,0) | |
714 | Part1.Material = Enum.Material.Neon | |
715 | Part1.CanCollide = false | |
716 | Part1.Color = Color3.fromHSV(Color3.toHSV(Color3.fromRGB((main.r+(255*part.Color.r))/2,(main.g+(255*part.Color.g))/2,(main.b+(255*part.Color.b))/2)),math.random(5000,10000)/10000,main.v) | |
717 | Part1.Parent = DebrisModel | |
718 | Part1.Size = Vector3.new(asdf,asdf,asdf) | |
719 | Part1.Anchored = true | |
720 | local a = 1.5 | |
721 | Part1.CFrame = CFrame.new(endPoint + Vector3.new(math.random(-2,2)*a,math.random(-4,4),math.random(-2,2)*a)) | |
722 | Part1.Name = "EXPLOSION" | |
723 | else | |
724 | local asdf = math.random(0,5)*10 | |
725 | local Part1 = Instance.new("Part") | |
726 | local mesh2 = Instance.new("SpecialMesh",Part1) | |
727 | mesh2.MeshType = Enum.MeshType.Sphere | |
728 | mesh2.Scale = Vector3.new(0,0,0) | |
729 | Part1.Material = Enum.Material.Neon | |
730 | Part1.CanCollide = false | |
731 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
732 | Part1.Parent = DebrisModel | |
733 | Part1.Size = Vector3.new(asdf,asdf,asdf) | |
734 | Part1.Anchored = true | |
735 | local a = 1.5 | |
736 | Part1.CFrame = CFrame.new(endPoint + Vector3.new(math.random(-2,2)*a,math.random(-4,4),math.random(-2,2)*a)) | |
737 | Part1.Name = "EXPLOSION" | |
738 | end | |
739 | end | |
740 | ||
741 | for i,v in pairs(findAllNearestTorso(endPoint,50)) do | |
742 | if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then | |
743 | v:Destroy() | |
744 | else | |
745 | v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/math.random(120,180)) | |
746 | end | |
747 | local Position = mouse.Hit.p | |
748 | local Target = v.Position | |
749 | local direction = Target - Position | |
750 | local direction = computeDirection(direction) | |
751 | local bv = Instance.new("BodyVelocity",v) | |
752 | bv.Velocity = direction * (10 - ((Position - Target).magnitude/2)) | |
753 | debris:AddItem(bv,1) | |
754 | end | |
755 | ||
756 | end | |
757 | clashpart:Destroy() | |
758 | Part0:Destroy() | |
759 | wait(0.3) | |
760 | aiming_anim = false | |
761 | delay(0.3,function() debounce = false end) | |
762 | end | |
763 | ||
764 | function nukewelpo() | |
765 | coroutine.resume(coroutine.create(function() | |
766 | local magnitude = nil | |
767 | local Position = nil | |
768 | if animid == 0 then | |
769 | Position = larm.Position | |
770 | else | |
771 | Position = rarm.Position | |
772 | end | |
773 | --sound(743499393,Position,10,math.random(6,8)/10) | |
774 | sound(440145223,Position,10,math.random(4,5)/10,100) | |
775 | ||
776 | local Part1 = Instance.new("Part") | |
777 | local mesh2 = Instance.new("SpecialMesh",Part1) | |
778 | mesh2.MeshId = "rbxassetid://559831844" | |
779 | mesh2.Scale = Vector3.new(0,0,0.4) | |
780 | Part1.Material = Enum.Material.Neon | |
781 | Part1.CanCollide = false | |
782 | Part1.Color = Color3.fromHSV(0,0,main.v) | |
783 | Part1.Parent = DebrisModel | |
784 | Part1.Size = Vector3.new(0,0,0) | |
785 | Part1.Anchored = true | |
786 | Part1.CFrame = CFrame.new(Position,mouse.Hit.p) | |
787 | Part1.Name = "EXPLOSION3" | |
788 | ||
789 | local Part0 = Instance.new("Part",DebrisModel) | |
790 | local PointLight2 = Instance.new("PointLight") | |
791 | Part0.Name = "Bullet" | |
792 | Part0.Material = Enum.Material.Neon | |
793 | Part0.Color = Color3.fromHSV(0,0,main.v) | |
794 | Part0.Anchored = false | |
795 | Part0.Size = Vector3.new(5, 5, 5) | |
796 | local mesh = Instance.new("SpecialMesh",Part0) | |
797 | mesh.MeshType = Enum.MeshType.Sphere | |
798 | mesh.Scale = Vector3.new(3,3,3) | |
799 | local bforce = Instance.new("BodyForce",Part0) | |
800 | bforce.force = Vector3.new(0, ((bforce.Parent:getMass())*workspace.Gravity), 0) | |
801 | Part0.CanCollide = false | |
802 | PointLight2.Parent = Part0 | |
803 | PointLight2.Color = Part0.Color | |
804 | local Target = mouse.Hit.p | |
805 | local direction = Target - Position | |
806 | local direction = computeDirection(direction) | |
807 | local pos = Position + (direction * 2) | |
808 | Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
809 | Part0.Velocity = direction * 150 | |
810 | local asd = nil | |
811 | local loop = nil | |
812 | delay(5, function() Part0:Destroy() loop:disconnect() asd:disconnect() end) | |
813 | loop = rs:connect(function() | |
814 | local asdf = math.random(500,1000)/1000 | |
815 | local Part1 = Instance.new("Part") | |
816 | local mesh2 = Instance.new("SpecialMesh",Part1) | |
817 | mesh2.MeshType = Enum.MeshType.Sphere | |
818 | Part1.Material = Enum.Material.Neon | |
819 | Part1.CanCollide = false | |
820 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
821 | Part1.Parent = DebrisModel | |
822 | Part1.Size = (Part0.Size*3) + Vector3.new(asdf,asdf,asdf) | |
823 | Part1.Anchored = true | |
824 | Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-3000,3000)/750,math.random(-3000,3000)/750,math.random(-3000,3000)/750)) | |
825 | Part1.Name = "SMOKE" | |
826 | end) | |
827 | asd = Part0.Touched:connect(function(ht) | |
828 | local hit=ht.Parent | |
829 | if checkIfNotPlayer(ht) == true and ht.CanCollide == true then | |
830 | asd:disconnect() | |
831 | loop:disconnect() | |
832 | Part0:Destroy() | |
833 | ||
834 | sound(explosionid[math.random(1,#explosionid)],Part0.Position,10,math.random(3,5)/10,500) | |
835 | for i,v in pairs(findAllNearestTorso(Part0.Position,160)) do | |
836 | if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then | |
837 | v:Destroy() | |
838 | else | |
839 | v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/(math.random(20,30)/10)) | |
840 | end | |
841 | local Position = Part0.Position | |
842 | local Target = v.Position | |
843 | local direction = Target - Position | |
844 | local direction = computeDirection(direction) | |
845 | local bv = Instance.new("BodyVelocity",v) | |
846 | bv.Velocity = direction * (120 - ((Position - Target).magnitude/2)) | |
847 | debris:AddItem(bv,1) | |
848 | end | |
849 | for i=1,10,0.5 do for x=1,math.random(0,1) do rs:wait() end | |
850 | for z=1,math.random(2,3) do | |
851 | local asdf = math.random(-5,5)*10-(i/20)*12 | |
852 | local Part1 = Instance.new("Part") | |
853 | local mesh2 = Instance.new("SpecialMesh",Part1) | |
854 | mesh2.MeshType = Enum.MeshType.Sphere | |
855 | mesh2.Scale = Vector3.new(0,0,0) | |
856 | Part1.Material = Enum.Material.Neon | |
857 | Part1.CanCollide = false | |
858 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
859 | Part1.Parent = DebrisModel | |
860 | Part1.Size = Vector3.new(asdf,asdf,asdf) | |
861 | Part1.Anchored = true | |
862 | local a = i*5 | |
863 | Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-2,2)*a,math.random(-30,30),math.random(-2,2)*a)) | |
864 | Part1.Name = "EXPLOSION4" | |
865 | end | |
866 | end | |
867 | ||
868 | end | |
869 | end) | |
870 | end)) | |
871 | end | |
872 | ||
873 | holdq = false | |
874 | holdr = false | |
875 | cooldownult = false | |
876 | ||
877 | mouse.KeyDown:connect(function(key) | |
878 | if debounce == false then | |
879 | if key == "e" then | |
880 | dashasdf() | |
881 | elseif key == "r" and cooldownult == false then | |
882 | cooldownult = true | |
883 | if animid == 0 then | |
884 | animid = 1 | |
885 | else | |
886 | animid = 0 | |
887 | end | |
888 | debounce = true | |
889 | holdr = true | |
890 | aiming_anim = true | |
891 | wait(0.2) | |
892 | repeat | |
893 | rs:wait() | |
894 | timer = 150 | |
895 | until holdr == false | |
896 | nukewelpo() | |
897 | ||
898 | local Position = mouse.Hit.p | |
899 | local Target = root.Position | |
900 | local direction = Target - Position | |
901 | local direction = computeDirection(direction) | |
902 | root.Velocity = direction * 300 | |
903 | ||
904 | aiming_anim = false | |
905 | delay(5,function() cooldownult = false end) | |
906 | delay(1,function() debounce = false end) | |
907 | ||
908 | elseif key == "q" then | |
909 | debounce = true | |
910 | if animid == 0 then | |
911 | animid = 1 | |
912 | else | |
913 | animid = 0 | |
914 | end | |
915 | holdq = true | |
916 | attack = true | |
917 | aiming_anim = true | |
918 | repeat rs:wait() timer = 150 until holdq == false | |
919 | laz0r() | |
920 | attack = false | |
921 | end | |
922 | end | |
923 | end) | |
924 | ||
925 | mouse.KeyUp:connect(function(key) | |
926 | if key == "q" then | |
927 | holdq = false | |
928 | elseif key == "r" then | |
929 | holdr = false | |
930 | end | |
931 | end) | |
932 | ||
933 | ---------------------------------------------------------------------------- | |
934 | music(themeid,themepitch) | |
935 | velocityYFall=0 | |
936 | velocityYFall2=0 | |
937 | velocityYFall3=0 | |
938 | velocityYFall4=0 | |
939 | neckrotY=0 | |
940 | neckrotY2=0 | |
941 | torsorotY=0 | |
942 | torsorotY2=0 | |
943 | torsoY=0 | |
944 | torsoY2=0 | |
945 | sine = 0 | |
946 | newWeld(torso, larm, -1.5, 0.5, 0) | |
947 | larm.Weld.C1 = CFrame.new(0, 0.5, 0) | |
948 | newWeld(torso, rarm, 1.5, 0.5, 0) | |
949 | rarm.Weld.C1 = CFrame.new(0, 0.5, 0) | |
950 | newWeld(torso, hed, 0, 1.5, 0) | |
951 | newWeld(torso, lleg, -0.5, -1, 0) | |
952 | lleg.Weld.C1 = CFrame.new(0, 1, 0) | |
953 | newWeld(torso, rleg, 0.5, -1, 0) | |
954 | rleg.Weld.C1 = CFrame.new(0, 1, 0) | |
955 | newWeld(root, torso, 0, -1, 0) | |
956 | torso.Weld.C1 = CFrame.new(0, -1, 0) | |
957 | ||
958 | rs:connect(function() | |
959 | ||
960 | bg.MaxTorque = Vector3.new(0,0,0) | |
961 | ||
962 | for i,v in pairs(DebrisModel:GetChildren()) do | |
963 | ||
964 | ||
965 | if v.Name == "EXPLOSION" then | |
966 | local change = 0.04-(v.Transparency*0.02) | |
967 | local vm = v:FindFirstChildOfClass("SpecialMesh") | |
968 | vm.Scale = vm.Scale + Vector3.new(change,change,change) | |
969 | v.Transparency = v.Transparency + 0.02 | |
970 | if v.Transparency >= 1 then | |
971 | v:Destroy() | |
972 | end | |
973 | ||
974 | elseif v.Name == "EXPLOSION2" then | |
975 | local change = 0.04-(v.Transparency*0.04) | |
976 | local vm = v:FindFirstChildOfClass("SpecialMesh") | |
977 | vm.Scale = vm.Scale + Vector3.new(change,change,0) | |
978 | v.Transparency = v.Transparency + 0.025 | |
979 | if v.Transparency >= 1 then | |
980 | v:Destroy() | |
981 | end | |
982 | ||
983 | elseif v.Name == "EXPLOSION3" then | |
984 | local change = 0.5-(v.Transparency*0.5) | |
985 | local vm = v:FindFirstChildOfClass("SpecialMesh") | |
986 | vm.Scale = vm.Scale + Vector3.new(change,change,0) | |
987 | v.Transparency = v.Transparency + 0.1 | |
988 | if v.Transparency >= 1 then | |
989 | v:Destroy() | |
990 | end | |
991 | ||
992 | elseif v.Name == "EXPLOSION4" then | |
993 | local change = 0.15-(v.Transparency*0.125) | |
994 | local vm = v:FindFirstChildOfClass("SpecialMesh") | |
995 | vm.Scale = vm.Scale + Vector3.new(change,change,change) | |
996 | v.Transparency = v.Transparency + 0.01 | |
997 | if v.Transparency >= 1 then | |
998 | v:Destroy() | |
999 | end | |
1000 | ||
1001 | elseif v.Name == "SMOKE" then | |
1002 | local vm = v:FindFirstChildOfClass("SpecialMesh") | |
1003 | vm.Scale = vm.Scale - Vector3.new(0.075,0.075,0.075) | |
1004 | if vm.Scale.X <= 0 then | |
1005 | v:Destroy() | |
1006 | end | |
1007 | ||
1008 | elseif v.Name == "SMOKE2" then | |
1009 | local change = 2-(v.Transparency*2) | |
1010 | local vm = v:FindFirstChildOfClass("SpecialMesh") | |
1011 | local Position = nil | |
1012 | if animid == 0 then | |
1013 | Position = larm.Position | |
1014 | else | |
1015 | Position = rarm.Position | |
1016 | end | |
1017 | local Target = mouse.Hit.p | |
1018 | local direction = Target - Position | |
1019 | local direction = computeDirection(direction) | |
1020 | local ray = Ray.new(Position, (Target-Position).unit*1048) | |
1021 | local part, endPoint = workspace:FindPartOnRay(ray, char) | |
1022 | vm.Scale = Vector3.new(vm.Scale.X,(Position-endPoint).magnitude,vm.Scale.Z) + Vector3.new(change,0,change) | |
1023 | local pos = Position + (direction * (vm.Scale.Y/2)) | |
1024 | v.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
1025 | vm.Offset = Vector3.new(math.random(-10000,10000)/10000,math.random(-10000,10000)/10000,0) | |
1026 | v.Transparency = v.Transparency + 0.1 | |
1027 | if v.Transparency >= 1 then | |
1028 | v:Destroy() | |
1029 | end | |
1030 | ||
1031 | ||
1032 | elseif v.Name == "LIGHTNING" then | |
1033 | local vm = v:FindFirstChildOfClass("BlockMesh") | |
1034 | vm.Scale = vm.Scale - Vector3.new(0.1,0.1,0) | |
1035 | if vm.Scale.X <= 0 then | |
1036 | v:Destroy() | |
1037 | end | |
1038 | ||
1039 | end | |
1040 | end | |
1041 | ||
1042 | if -root.Velocity.Y/1.5 > 0 and -root.Velocity.Y/1.5 < 160 then | |
1043 | velocityYFall = root.Velocity.Y/1.5 | |
1044 | end | |
1045 | if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then | |
1046 | velocityYFall2 = root.Velocity.Y/180 | |
1047 | end | |
1048 | if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then | |
1049 | velocityYFall3 = root.Velocity.Y/1.5 | |
1050 | end | |
1051 | if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then | |
1052 | velocityYFall4 = root.Velocity.Y/1.5 | |
1053 | end | |
1054 | if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then | |
1055 | neckrotY = root.RotVelocity.Y/6 | |
1056 | end | |
1057 | if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then | |
1058 | neckrotY2 = root.RotVelocity.Y/8 | |
1059 | end | |
1060 | ||
1061 | if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then | |
1062 | torsorotY = root.RotVelocity.Y/6 | |
1063 | end | |
1064 | if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then | |
1065 | torsorotY2 = root.RotVelocity.Y/8 | |
1066 | end | |
1067 | ||
1068 | ||
1069 | torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20 | |
1070 | torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36 | |
1071 | ||
1072 | if attack == true then | |
1073 | hum.WalkSpeed = 1 | |
1074 | else | |
1075 | hum.WalkSpeed = 8 | |
1076 | end | |
1077 | ||
1078 | if canjump == true then | |
1079 | hum.JumpPower = 50 | |
1080 | else | |
1081 | hum.JumpPower = 0 | |
1082 | end | |
1083 | ||
1084 | local jumped = false | |
1085 | local ray1 = Ray.new(root.Position+Vector3.new(1,0,0),Vector3.new(0, -6, 0)) | |
1086 | local part1, endPoint = workspace:FindPartOnRay(ray1, char) | |
1087 | local ray2 = Ray.new(root.Position-Vector3.new(1,0,0),Vector3.new(0, -6, 0)) | |
1088 | local part2, endPoint = workspace:FindPartOnRay(ray2, char) | |
1089 | local ray3 = Ray.new(root.Position+Vector3.new(0,0,0.5),Vector3.new(0, -6, 0)) | |
1090 | local part3, endPoint = workspace:FindPartOnRay(ray3, char) | |
1091 | local ray4 = Ray.new(root.Position-Vector3.new(0,0,0.5),Vector3.new(0, -6, 0)) | |
1092 | local part4, endPoint = workspace:FindPartOnRay(ray4, char) | |
1093 | ||
1094 | if part1 or part2 or part3 or part4 then jumped = false else endPoint = 0 jumped = true end | |
1095 | ||
1096 | local rlegray = Ray.new(rleg.Position+Vector3.new(0,0.5,0),Vector3.new(0, -1.75, 0)) | |
1097 | local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char) | |
1098 | ||
1099 | local llegray = Ray.new(lleg.Position+Vector3.new(0,0.5,0),Vector3.new(0, -1.75, 0)) | |
1100 | local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char) | |
1101 | ||
1102 | if no_anim == false then | |
1103 | if hum.Health > 0 then | |
1104 | if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then | |
1105 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(-18),math.rad(0+math.rad(0+2*math.cos(sine/2))),0), 0.1) | |
1106 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-10),0,0),0.1) | |
1107 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62-(movement/30)*math.cos(sine/4)/2,(movement/50)*math.cos(sine/4))*CFrame.Angles(math.rad(-5-(movement*2)*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
1108 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62+(movement/30)*math.cos(sine/4)/2,-(movement/50)*math.cos(sine/4))*CFrame.Angles(math.rad(-5+(movement*2)*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
1109 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1+(movement/20)*math.cos(sine/2), 0) * CFrame.Angles(math.rad(-(change*20)-4*math.cos(sine/2)), torsorotY2+math.rad(0-4*math.cos(sine/4)), torsorotY2+math.rad(0-1*math.cos(sine/4))), 0.1) | |
1110 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.85-(movement/10)*math.cos(sine/4)/2,-0.1+(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-10+(change*5)-movement*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
1111 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.85+(movement/10)*math.cos(sine/4)/2,-0.1-(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-10+(change*5)+movement*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
1112 | elseif jumped == true then | |
1113 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(-18),math.rad(0+math.rad(0+2*math.cos(sine/2))),0), 0.1) | |
1114 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0),0.1) | |
1115 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,1-0.1*math.cos(sine/16)/2,0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(-50-1*math.cos(sine/8))), 0.2) | |
1116 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,1-0.1*math.cos(sine/16)/2,0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(50+1*math.cos(sine/8))), 0.2) | |
1117 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1) | |
1118 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.925+0.1*math.cos(sine/16),0)*CFrame.Angles(math.rad(-35-1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(-2-0.5*math.cos(sine/8))), 0.2) | |
1119 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,0+0.1*math.cos(sine/16),-0.8)*CFrame.Angles(math.rad(-25+1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(2+0.5*math.cos(sine/8))), 0.2) | |
1120 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then | |
1121 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.1)*CFrame.Angles(math.rad(-18),math.rad(0+math.rad(0+2*math.cos(sine/2))),0), 0.1) | |
1122 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-15),0,0),0.1) | |
1123 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(-5-1*math.cos(sine/8))), 0.2) | |
1124 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(5+1*math.cos(sine/8))), 0.2) | |
1125 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1) | |
1126 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(0,llegendPoint.Y-lleg.Position.Y,0)*CFrame.new(-0.5,0+0.1*math.cos(sine/16),0)*CFrame.Angles(math.rad(0-1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(-2-0.5*math.cos(sine/8))), 0.2) | |
1127 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0,rlegendPoint.Y-rleg.Position.Y,0)*CFrame.new(0.5,0+0.1*math.cos(sine/16),0)*CFrame.Angles(math.rad(0+1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(2+0.5*math.cos(sine/8))), 0.2) | |
1128 | end | |
1129 | for i=1,5 do | |
1130 | if aiming_anim == true then | |
1131 | bg.MaxTorque = Vector3.new(9e9,9e9,9e9) | |
1132 | if jumped == false then | |
1133 | bg.CFrame = CFrame.new(root.Position,Vector3.new(mouse.Hit.x,root.Position.Y,mouse.Hit.z)) | |
1134 | else | |
1135 | bg.CFrame = CFrame.new(root.Position,mouse.Hit.p) | |
1136 | end | |
1137 | if animid == 0 then | |
1138 | hed.Weld.C1 = Lerp(hed.Weld.C1,CFrame.Angles(0,math.rad(-80),0),0.4) | |
1139 | torso.Weld.C0 = Lerp(torso.Weld.C0,CFrame.new(0, -1.1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(-80), math.rad(0-1*math.cos(sine/32))),0.2) | |
1140 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(-10-1*math.cos(sine/16)),math.rad(-90-1*math.cos(sine/8))),0.4) | |
1141 | else | |
1142 | hed.Weld.C1 = Lerp(hed.Weld.C1,CFrame.Angles(0,math.rad(80),0),0.4) | |
1143 | torso.Weld.C0 = Lerp(torso.Weld.C0,CFrame.new(0, -1.1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(80), math.rad(0-1*math.cos(sine/32))),0.2) | |
1144 | rarm.Weld.C0 = Lerp(rarm.Weld.C0,CFrame.new(1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(10-1*math.cos(sine/16)),math.rad(90+1*math.cos(sine/8))),0.4) | |
1145 | end | |
1146 | else | |
1147 | if timer <= 0 then | |
1148 | animid = math.random(0,1) | |
1149 | else | |
1150 | timer = timer - 1 | |
1151 | end | |
1152 | end | |
1153 | end | |
1154 | end | |
1155 | end | |
1156 | main_color = Color3.fromRGB(main.r,main.g,main.b) | |
1157 | pr.Value = main.r | |
1158 | pg.Value = main.g | |
1159 | pb.Value = main.b | |
1160 | pv.Value = main.v | |
1161 | idth.Value = themeid | |
1162 | pith.Value = themepitch | |
1163 | HName.TextStrokeColor3 = Color3.fromHSV(Color3.toHSV(main_color),1,main.v/2) | |
1164 | HName.TextColor3 = Color3.fromHSV(Color3.toHSV(main_color),1,main.v) | |
1165 | sine = sine + change | |
1166 | if hum.Health <= 0 then | |
1167 | debounce = true | |
1168 | end | |
1169 | end) |