Advertisement
gecksad

Untitled

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