Advertisement
Ban43_GodOfEdits

gtg

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