ManOhMan

Untitled

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