Acc_kili

Untitled

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