AstroScripts

Untitled

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