DarkScriptZEditors

Star Light

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