Advertisement
plytalent

star light fe

Dec 25th, 2018
356
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.09 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 = false
  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 * 600
  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").MaxHealth = 0
  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 = false
  537. holdclick = true
  538. aiming_anim = false
  539. repeat
  540. wait(1/1000000000000000000000000000000000000000000000000000000000000000000000000000000000)
  541. --repeat
  542. ----rs:wait()
  543. ----timer = 1
  544. ----until holdclick == false
  545. bigboomrektxd()
  546. until holdclick == false
  547. local Position = mouse.Hit.p
  548. local Target = root.Position
  549. local direction = Target - Position
  550. local direction = computeDirection(direction)
  551. root.Velocity = direction * 10
  552.  
  553. aiming_anim = false
  554. delay(0.00000000000000000000000000000000000001,function() debounce = false end)
  555. end
  556. end)
  557.  
  558. mouse.Button1Up:connect(function()
  559. holdclick=false
  560. end)
  561.  
  562. function dashasdf()
  563. debounce = true
  564.  
  565. canjump = true
  566. attack = false
  567.  
  568. for i,v in pairs(char:GetChildren()) do
  569. if v ~= root then
  570. if v:IsA("Part") then
  571. v.Transparency = 1
  572. elseif v:IsA("Accoutrement") then
  573. v:FindFirstChildOfClass("Part").Transparency = 1
  574. end
  575. end
  576. end
  577.  
  578. local tempattachment = Instance.new("Attachment",root)
  579. tempattachment.Position = Vector3.new(0,0,-4)
  580.  
  581. for i=1,20 do rs:wait()
  582. root.Velocity = Vector3.new(0,0,0)
  583. root.CFrame = CFrame.new(tempattachment.WorldPosition) * CFrame.Angles(math.rad(root.Orientation.X),math.rad(root.Orientation.Y),math.rad(root.Orientation.Z))
  584. local asdf = math.random(500,1000)/100
  585. local Part1 = Instance.new("Part")
  586. local mesh2 = Instance.new("SpecialMesh",Part1)
  587. mesh2.MeshType = Enum.MeshType.Sphere
  588. Part1.Material = Enum.Material.Neon
  589. Part1.CanCollide = false
  590. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  591. Part1.Parent = DebrisModel
  592. Part1.Size = Vector3.new(asdf,asdf,asdf)
  593. Part1.Anchored = true
  594. Part1.CFrame = CFrame.new(root.Position + Vector3.new(math.random(-1000,1000)/500,math.random(-1000,1000)/500,math.random(-1000,1000)/500))
  595. Part1.Name = "SMOKE"
  596. end
  597.  
  598. tempattachment:Destroy()
  599.  
  600. for i,v in pairs(char:GetChildren()) do
  601. if v ~= root then
  602. if v:IsA("Part") then
  603. v.Transparency = 0
  604. elseif v:IsA("Accoutrement") then
  605. v:FindFirstChildOfClass("Part").Transparency = 0
  606. end
  607. end
  608. end
  609.  
  610. canjump = true
  611. attack = false
  612.  
  613. delay(0,function() debounce = false end)
  614. end
  615.  
  616. function laz0r()
  617.  
  618. local Position = nil
  619. if animid == 0 then
  620. Position = larm.Position
  621. else
  622. Position = rarm.Position
  623. end
  624.  
  625. local Part1 = Instance.new("Part")
  626. local mesh2 = Instance.new("SpecialMesh",Part1)
  627. mesh2.MeshId = "rbxassetid://559831844"
  628. mesh2.Scale = Vector3.new(0,0,0.4)
  629. Part1.Material = Enum.Material.Neon
  630. Part1.CanCollide = false
  631. Part1.Color = Color3.fromHSV(0,0,main.v)
  632. Part1.Parent = DebrisModel
  633. Part1.Size = Vector3.new(0,0,0)
  634. Part1.Anchored = true
  635. Part1.CFrame = CFrame.new(Position,mouse.Hit.p)
  636. Part1.Name = "EXPLOSION3"
  637.  
  638. local Part0 = Instance.new("Part",DebrisModel)
  639. Part0.Name = "Bullet"
  640. Part0.Material = Enum.Material.Neon
  641. Part0.Color = Color3.fromHSV(0,0,main.v)
  642. Part0.Anchored = true
  643. local mesh = Instance.new("SpecialMesh",Part0)
  644. mesh.MeshType = Enum.MeshType.Sphere
  645. Part0.CanCollide = false
  646. local Target = mouse.Hit.p
  647. local direction = Target - Position
  648. local direction = computeDirection(direction)
  649. local ray = Ray.new(Position, (Target-Position).unit*1048)
  650. local part, endPoint = workspace:FindPartOnRay(ray, char)
  651. Part0.Size = Vector3.new(5,1,5)
  652. mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude,1)
  653. local pos = Position + (direction * (mesh.Scale.Y/2))
  654. Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  655.  
  656. clashpart = Instance.new("Part",DebrisModel)
  657. clashpart.Size = Vector3.new(50,50,50)
  658. clashpart.CanCollide = false
  659. clashpart.Anchored = true
  660. clashpart.Transparency = 1
  661. clashpart.Color = main_color
  662. clashpart.Name = "StarLightClash"
  663. clashpart.CFrame = CFrame.new(endPoint, root.Position)
  664.  
  665. sound(1177475476,Position,10,math.random(5,6)/10,300)
  666.  
  667. local z = 10
  668. for i = 1,100 do rs:wait()
  669. if animid == 0 then
  670. Position = larm.Position
  671. else
  672. Position = rarm.Position
  673. end
  674. local Target = mouse.Hit.p
  675. local direction = Target - Position
  676. local direction = computeDirection(direction)
  677. local ray = Ray.new(Position, (Target-Position).unit*1048)
  678. local part, endPoint = workspace:FindPartOnRay(ray, char)
  679. Part0.Size = Vector3.new(5-((i/100)*5),1,5-((i/100)*5))
  680. mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude,1)
  681. mesh.Offset = Vector3.new(math.random(-10000,10000)/20000,math.random(-10000,10000)/20000,0)
  682. local pos = Position + (direction * (mesh.Scale.Y/2))
  683. Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  684. clashpart.CFrame = CFrame.new(endPoint, root.Position)
  685.  
  686. local Position = mouse.Hit.p
  687. local Target = root.Position
  688. local direction = Target - Position
  689. local direction = computeDirection(direction)
  690. root.Velocity = direction * 5
  691.  
  692. if i >= z then z = i + 10 sound(explosionid[math.random(1,#explosionid)],endPoint,10,math.random(6,9)/10,200) end
  693.  
  694. Part1 = Part0:Clone()
  695. Part1.Parent = DebrisModel
  696. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  697. Part1.Name = "SMOKE2"
  698.  
  699. if part ~= nil then
  700. if part.Name == "StarLightClash" then
  701. local asdf = math.random(0,5)*20
  702. local Part1 = Instance.new("Part")
  703. local mesh2 = Instance.new("SpecialMesh",Part1)
  704. mesh2.MeshType = Enum.MeshType.Sphere
  705. mesh2.Scale = Vector3.new(0,0,0)
  706. Part1.Material = Enum.Material.Neon
  707. Part1.CanCollide = false
  708. 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)
  709. Part1.Parent = DebrisModel
  710. Part1.Size = Vector3.new(asdf,asdf,asdf)
  711. Part1.Anchored = true
  712. local a = 1.5
  713. Part1.CFrame = CFrame.new(endPoint + Vector3.new(math.random(-2,2)*a,math.random(-4,4),math.random(-2,2)*a))
  714. Part1.Name = "EXPLOSION"
  715. else
  716. local asdf = math.random(0,5)*10
  717. local Part1 = Instance.new("Part")
  718. local mesh2 = Instance.new("SpecialMesh",Part1)
  719. mesh2.MeshType = Enum.MeshType.Sphere
  720. mesh2.Scale = Vector3.new(0,0,0)
  721. Part1.Material = Enum.Material.Neon
  722. Part1.CanCollide = false
  723. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  724. Part1.Parent = DebrisModel
  725. Part1.Size = Vector3.new(asdf,asdf,asdf)
  726. Part1.Anchored = true
  727. local a = 1.5
  728. Part1.CFrame = CFrame.new(endPoint + Vector3.new(math.random(-2,2)*a,math.random(-4,4),math.random(-2,2)*a))
  729. Part1.Name = "EXPLOSION"
  730. end
  731. end
  732.  
  733. for i,v in pairs(findAllNearestTorso(endPoint,50)) do
  734. if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
  735. v:Destroy()
  736. else
  737. v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/math.random(120,180))
  738. end
  739. local Position = mouse.Hit.p
  740. local Target = v.Position
  741. local direction = Target - Position
  742. local direction = computeDirection(direction)
  743. local bv = Instance.new("BodyVelocity",v)
  744. bv.Velocity = direction * (10 - ((Position - Target).magnitude/2))
  745. debris:AddItem(bv,1)
  746. end
  747.  
  748. end
  749. clashpart:Destroy()
  750. Part0:Destroy()
  751. wait(0.3)
  752. aiming_anim = false
  753. delay(0.3,function() debounce = false end)
  754. end
  755.  
  756. function nukewelpo()
  757. coroutine.resume(coroutine.create(function()
  758. local magnitude = nil
  759. local Position = nil
  760. if animid == 0 then
  761. Position = larm.Position
  762. else
  763. Position = rarm.Position
  764. end
  765. --sound(743499393,Position,10,math.random(6,8)/10)
  766. sound(440145223,Position,10,math.random(4,5)/10,100)
  767.  
  768. local Part1 = Instance.new("Part")
  769. local mesh2 = Instance.new("SpecialMesh",Part1)
  770. mesh2.MeshId = "rbxassetid://559831844"
  771. mesh2.Scale = Vector3.new(0,0,0.4)
  772. Part1.Material = Enum.Material.Neon
  773. Part1.CanCollide = false
  774. Part1.Color = Color3.fromHSV(0,0,main.v)
  775. Part1.Parent = DebrisModel
  776. Part1.Size = Vector3.new(0,0,0)
  777. Part1.Anchored = true
  778. Part1.CFrame = CFrame.new(Position,mouse.Hit.p)
  779. Part1.Name = "EXPLOSION3"
  780.  
  781. local Part0 = Instance.new("Part",DebrisModel)
  782. local PointLight2 = Instance.new("PointLight")
  783. Part0.Name = "Bullet"
  784. Part0.Material = Enum.Material.Neon
  785. Part0.Color = Color3.fromHSV(0,0,main.v)
  786. Part0.Anchored = false
  787. Part0.Size = Vector3.new(5, 5, 5)
  788. local mesh = Instance.new("SpecialMesh",Part0)
  789. mesh.MeshType = Enum.MeshType.Sphere
  790. mesh.Scale = Vector3.new(3,3,3)
  791. local bforce = Instance.new("BodyForce",Part0)
  792. bforce.force = Vector3.new(0, ((bforce.Parent:getMass())*workspace.Gravity), 0)
  793. Part0.CanCollide = false
  794. PointLight2.Parent = Part0
  795. PointLight2.Color = Part0.Color
  796. local Target = mouse.Hit.p
  797. local direction = Target - Position
  798. local direction = computeDirection(direction)
  799. local pos = Position + (direction * 2)
  800. Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  801. Part0.Velocity = direction * 150
  802. local asd = nil
  803. local loop = nil
  804. delay(5, function() Part0:Destroy() loop:disconnect() asd:disconnect() end)
  805. loop = rs:connect(function()
  806. local asdf = math.random(500,1000)/1000
  807. local Part1 = Instance.new("Part")
  808. local mesh2 = Instance.new("SpecialMesh",Part1)
  809. mesh2.MeshType = Enum.MeshType.Sphere
  810. Part1.Material = Enum.Material.Neon
  811. Part1.CanCollide = false
  812. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  813. Part1.Parent = DebrisModel
  814. Part1.Size = (Part0.Size*3) + Vector3.new(asdf,asdf,asdf)
  815. Part1.Anchored = true
  816. Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-3000,3000)/750,math.random(-3000,3000)/750,math.random(-3000,3000)/750))
  817. Part1.Name = "SMOKE"
  818. end)
  819. asd = Part0.Touched:connect(function(ht)
  820. local hit=ht.Parent
  821. if checkIfNotPlayer(ht) == true and ht.CanCollide == true then
  822. asd:disconnect()
  823. loop:disconnect()
  824. Part0:Destroy()
  825.  
  826. sound(explosionid[math.random(1,#explosionid)],Part0.Position,10,math.random(3,5)/10,500)
  827. for i,v in pairs(findAllNearestTorso(Part0.Position,160)) do
  828. if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
  829. v:Destroy()
  830. else
  831. v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/(math.random(20,30)/10))
  832. end
  833. local Position = Part0.Position
  834. local Target = v.Position
  835. local direction = Target - Position
  836. local direction = computeDirection(direction)
  837. local bv = Instance.new("BodyVelocity",v)
  838. bv.Velocity = direction * (120 - ((Position - Target).magnitude/2))
  839. debris:AddItem(bv,1)
  840. end
  841. for i=1,10,0.5 do for x=1,math.random(0,1) do rs:wait() end
  842. for z=1,math.random(2,3) do
  843. local asdf = math.random(-5,5)*10-(i/20)*12
  844. local Part1 = Instance.new("Part")
  845. local mesh2 = Instance.new("SpecialMesh",Part1)
  846. mesh2.MeshType = Enum.MeshType.Sphere
  847. mesh2.Scale = Vector3.new(0,0,0)
  848. Part1.Material = Enum.Material.Neon
  849. Part1.CanCollide = false
  850. Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v)
  851. Part1.Parent = DebrisModel
  852. Part1.Size = Vector3.new(asdf,asdf,asdf)
  853. Part1.Anchored = true
  854. local a = i*5
  855. Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-2,2)*a,math.random(-30,30),math.random(-2,2)*a))
  856. Part1.Name = "EXPLOSION4"
  857. end
  858. end
  859.  
  860. end
  861. end)
  862. end))
  863. end
  864.  
  865. holdq = false
  866. holdr = false
  867. cooldownult = false
  868.  
  869. mouse.KeyDown:connect(function(key)
  870. if debounce == false then
  871. if key == "e" then
  872. dashasdf()
  873. elseif key == "r" and cooldownult == false then
  874. cooldownult = true
  875. if animid == 0 then
  876. animid = 1
  877. else
  878. animid = 0
  879. end
  880. debounce = true
  881. holdr = true
  882. aiming_anim = true
  883. wait(0.2)
  884. repeat
  885. rs:wait()
  886. timer = 150
  887. until holdr == false
  888. nukewelpo()
  889.  
  890. local Position = mouse.Hit.p
  891. local Target = root.Position
  892. local direction = Target - Position
  893. local direction = computeDirection(direction)
  894. root.Velocity = direction * 300
  895.  
  896. aiming_anim = false
  897. delay(5,function() cooldownult = false end)
  898. delay(1,function() debounce = false end)
  899.  
  900. elseif key == "q" then
  901. debounce = true
  902. if animid == 0 then
  903. animid = 1
  904. else
  905. animid = 0
  906. end
  907. holdq = true
  908. attack = true
  909. aiming_anim = true
  910. repeat rs:wait() timer = 150 until holdq == false
  911. laz0r()
  912. attack = false
  913. end
  914. end
  915. end)
  916.  
  917. mouse.KeyUp:connect(function(key)
  918. if key == "q" then
  919. holdq = false
  920. elseif key == "r" then
  921. holdr = false
  922. end
  923. end)
  924.  
  925. ----------------------------------------------------------------------------
  926. music(themeid,themepitch)
  927. velocityYFall=0
  928. velocityYFall2=0
  929. velocityYFall3=0
  930. velocityYFall4=0
  931. neckrotY=0
  932. neckrotY2=0
  933. torsorotY=0
  934. torsorotY2=0
  935. torsoY=0
  936. torsoY2=0
  937. sine = 0
  938. newWeld(torso, larm, -1.5, 0.5, 0)
  939. larm.Weld.C1 = CFrame.new(0, 0.5, 0)
  940. newWeld(torso, rarm, 1.5, 0.5, 0)
  941. rarm.Weld.C1 = CFrame.new(0, 0.5, 0)
  942. newWeld(torso, hed, 0, 1.5, 0)
  943. newWeld(torso, lleg, -0.5, -1, 0)
  944. lleg.Weld.C1 = CFrame.new(0, 1, 0)
  945. newWeld(torso, rleg, 0.5, -1, 0)
  946. rleg.Weld.C1 = CFrame.new(0, 1, 0)
  947. newWeld(root, torso, 0, -1, 0)
  948. torso.Weld.C1 = CFrame.new(0, -1, 0)
  949.  
  950. rs:connect(function()
  951.  
  952. bg.MaxTorque = Vector3.new(0,0,0)
  953.  
  954. for i,v in pairs(DebrisModel:GetChildren()) do
  955.  
  956.  
  957. if v.Name == "EXPLOSION" then
  958. local change = 0.04-(v.Transparency*0.02)
  959. local vm = v:FindFirstChildOfClass("SpecialMesh")
  960. vm.Scale = vm.Scale + Vector3.new(change,change,change)
  961. v.Transparency = v.Transparency + 0.02
  962. if v.Transparency >= 1 then
  963. v:Destroy()
  964. end
  965.  
  966. elseif v.Name == "EXPLOSION2" then
  967. local change = 0.04-(v.Transparency*0.04)
  968. local vm = v:FindFirstChildOfClass("SpecialMesh")
  969. vm.Scale = vm.Scale + Vector3.new(change,change,0)
  970. v.Transparency = v.Transparency + 0.025
  971. if v.Transparency >= 1 then
  972. v:Destroy()
  973. end
  974.  
  975. elseif v.Name == "EXPLOSION3" then
  976. local change = 0.5-(v.Transparency*0.5)
  977. local vm = v:FindFirstChildOfClass("SpecialMesh")
  978. vm.Scale = vm.Scale + Vector3.new(change,change,0)
  979. v.Transparency = v.Transparency + 0.1
  980. if v.Transparency >= 1 then
  981. v:Destroy()
  982. end
  983.  
  984. elseif v.Name == "EXPLOSION4" then
  985. local change = 0.15-(v.Transparency*0.125)
  986. local vm = v:FindFirstChildOfClass("SpecialMesh")
  987. vm.Scale = vm.Scale + Vector3.new(change,change,change)
  988. v.Transparency = v.Transparency + 0.01
  989. if v.Transparency >= 1 then
  990. v:Destroy()
  991. end
  992.  
  993. elseif v.Name == "SMOKE" then
  994. local vm = v:FindFirstChildOfClass("SpecialMesh")
  995. vm.Scale = vm.Scale - Vector3.new(0.075,0.075,0.075)
  996. if vm.Scale.X <= 0 then
  997. v:Destroy()
  998. end
  999.  
  1000. elseif v.Name == "SMOKE2" then
  1001. local change = 2-(v.Transparency*2)
  1002. local vm = v:FindFirstChildOfClass("SpecialMesh")
  1003. local Position = nil
  1004. if animid == 0 then
  1005. Position = larm.Position
  1006. else
  1007. Position = rarm.Position
  1008. end
  1009. local Target = mouse.Hit.p
  1010. local direction = Target - Position
  1011. local direction = computeDirection(direction)
  1012. local ray = Ray.new(Position, (Target-Position).unit*1048)
  1013. local part, endPoint = workspace:FindPartOnRay(ray, char)
  1014. vm.Scale = Vector3.new(vm.Scale.X,(Position-endPoint).magnitude,vm.Scale.Z) + Vector3.new(change,0,change)
  1015. local pos = Position + (direction * (vm.Scale.Y/2))
  1016. v.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0)
  1017. vm.Offset = Vector3.new(math.random(-10000,10000)/10000,math.random(-10000,10000)/10000,0)
  1018. v.Transparency = v.Transparency + 0.1
  1019. if v.Transparency >= 1 then
  1020. v:Destroy()
  1021. end
  1022.  
  1023.  
  1024. elseif v.Name == "LIGHTNING" then
  1025. local vm = v:FindFirstChildOfClass("BlockMesh")
  1026. vm.Scale = vm.Scale - Vector3.new(0.1,0.1,0)
  1027. if vm.Scale.X <= 0 then
  1028. v:Destroy()
  1029. end
  1030.  
  1031. end
  1032. end
  1033.  
  1034. if -root.Velocity.Y/1.5 > 0 and -root.Velocity.Y/1.5 < 160 then
  1035. velocityYFall = root.Velocity.Y/1.5
  1036. end
  1037. if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then
  1038. velocityYFall2 = root.Velocity.Y/180
  1039. end
  1040. if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then
  1041. velocityYFall3 = root.Velocity.Y/1.5
  1042. end
  1043. if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then
  1044. velocityYFall4 = root.Velocity.Y/1.5
  1045. end
  1046. if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then
  1047. neckrotY = root.RotVelocity.Y/6
  1048. end
  1049. if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then
  1050. neckrotY2 = root.RotVelocity.Y/8
  1051. end
  1052.  
  1053. if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then
  1054. torsorotY = root.RotVelocity.Y/6
  1055. end
  1056. if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then
  1057. torsorotY2 = root.RotVelocity.Y/8
  1058. end
  1059.  
  1060.  
  1061. torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20
  1062. torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36
  1063.  
  1064. if attack == true then
  1065. hum.WalkSpeed = 1
  1066. else
  1067. hum.WalkSpeed = 8
  1068. end
  1069.  
  1070. if canjump == true then
  1071. hum.JumpPower = 50
  1072. else
  1073. hum.JumpPower = 0
  1074. end
  1075.  
  1076. local jumped = false
  1077. local ray1 = Ray.new(root.Position+Vector3.new(1,0,0),Vector3.new(0, -6, 0))
  1078. local part1, endPoint = workspace:FindPartOnRay(ray1, char)
  1079. local ray2 = Ray.new(root.Position-Vector3.new(1,0,0),Vector3.new(0, -6, 0))
  1080. local part2, endPoint = workspace:FindPartOnRay(ray2, char)
  1081. local ray3 = Ray.new(root.Position+Vector3.new(0,0,0.5),Vector3.new(0, -6, 0))
  1082. local part3, endPoint = workspace:FindPartOnRay(ray3, char)
  1083. local ray4 = Ray.new(root.Position-Vector3.new(0,0,0.5),Vector3.new(0, -6, 0))
  1084. local part4, endPoint = workspace:FindPartOnRay(ray4, char)
  1085.  
  1086. if part1 or part2 or part3 or part4 then jumped = false else endPoint = 0 jumped = true end
  1087.  
  1088. local rlegray = Ray.new(rleg.Position+Vector3.new(0,0.5,0),Vector3.new(0, -1.75, 0))
  1089. local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char)
  1090.  
  1091. local llegray = Ray.new(lleg.Position+Vector3.new(0,0.5,0),Vector3.new(0, -1.75, 0))
  1092. local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char)
  1093.  
  1094. if no_anim == false then
  1095. if hum.Health > 0 then
  1096. if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then
  1097. 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)
  1098. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-10),0,0),0.1)
  1099. 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)
  1100. 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)
  1101. 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)
  1102. 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)
  1103. 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)
  1104. elseif jumped == true then
  1105. hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(-18),math.rad(0+math.rad(0+2*math.cos(sine/2))),0), 0.1)
  1106. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0),0.1)
  1107. 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)
  1108. 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)
  1109. 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)
  1110. 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)
  1111. 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)
  1112. elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then
  1113. 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)
  1114. hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-15),0,0),0.1)
  1115. 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)
  1116. 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)
  1117. 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)
  1118. 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)
  1119. 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)
  1120. end
  1121. for i=1,5 do
  1122. if aiming_anim == true then
  1123. bg.MaxTorque = Vector3.new(9e9,9e9,9e9)
  1124. if jumped == false then
  1125. bg.CFrame = CFrame.new(root.Position,Vector3.new(mouse.Hit.x,root.Position.Y,mouse.Hit.z))
  1126. else
  1127. bg.CFrame = CFrame.new(root.Position,mouse.Hit.p)
  1128. end
  1129. if animid == 0 then
  1130. hed.Weld.C1 = Lerp(hed.Weld.C1,CFrame.Angles(0,math.rad(-80),0),0.4)
  1131. 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)
  1132. 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)
  1133. else
  1134. hed.Weld.C1 = Lerp(hed.Weld.C1,CFrame.Angles(0,math.rad(80),0),0.4)
  1135. 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)
  1136. 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)
  1137. end
  1138. else
  1139. if timer <= 0 then
  1140. animid = math.random(0,1)
  1141. else
  1142. timer = timer - 1
  1143. end
  1144. end
  1145. end
  1146. end
  1147. end
  1148. main_color = Color3.fromRGB(main.r,main.g,main.b)
  1149.  
  1150.  
  1151. HName.TextStrokeColor3 = Color3.fromHSV(Color3.toHSV(main_color),1,main.v/2)
  1152. HName.TextColor3 = Color3.fromHSV(Color3.toHSV(main_color),1,main.v)
  1153. sine = sine + change
  1154. if hum.Health <= 0 then
  1155. debounce = true
  1156. end
  1157. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement