carlosname

Untitled

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