Advertisement
Dark_EccentricYT

Untitled

Mar 11th, 2018 (edited)
1,433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.24 KB | None | 0 0
  1. -- Created by Nebula_Zorua --
  2. -- 10mm pistol --
  3. -- was gonna have VATS --
  4. -- Discord: Nebula the Zorua#6969
  5. -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA
  6.  
  7. local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
  8.  
  9. local plr = S.Players.LocalPlayer
  10. local char = plr.Character
  11. local hum = char.Humanoid
  12. local rarm = char["Right Arm"]
  13. local larm= char["Left Arm"]
  14. local rleg= char["Right Leg"]
  15. local lleg = char["Left Leg"]
  16. local root = char:FindFirstChild'HumanoidRootPart'
  17. local torso = char.Torso
  18. local head = char.Head
  19. local sine = 0;
  20. local combo = 1;
  21. local lastClick = time()
  22. local change = 1;
  23. local runService = S.RunService
  24. local mouse = plr:GetMouse()
  25. local Attack = false
  26. local AbuseMode = false
  27. local neutralAnims = true
  28. local PaintBody = nil
  29. local PlayerSize = 1
  30. local Debounces = {Debounces={}}
  31. local Hit = {}
  32. local BloodPuddles = {}
  33. local Teamed = {}
  34. local BloodColor = BrickColor.new'Maroon'
  35. local BloodMaterial = Enum.Material.Granite
  36. local FPS = false
  37. function Debounces:New(name,cooldown)
  38. local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
  39. setmetatable(aaaaa,{__index = Debounces})
  40. Debounces.Debounces[name] = aaaaa
  41. return aaaaa
  42. end
  43.  
  44. function Debounces:Use(overrideUsable)
  45. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  46. if(self.Usable or overrideUsable)then
  47. self.Usable = false
  48. self.CoolingDown = true
  49. local LastUse = time()
  50. self.LastUse = LastUse
  51. delay(self.Cooldown or 2,function()
  52. if(self.LastUse == LastUse)then
  53. self.CoolingDown = false
  54. self.Usable = true
  55. end
  56. end)
  57. end
  58. end
  59.  
  60. function Debounces:Get(name)
  61. assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
  62. for i,v in next, Debounces.Debounces do
  63. if(i == name)then
  64. return v;
  65. end
  66. end
  67. end
  68.  
  69. function Debounces:GetProgressPercentage()
  70. assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use")
  71. if(self.CoolingDown and not self.Usable)then
  72. return math.max(
  73. math.floor(
  74. (
  75. (time()-self.LastUse)/self.Cooldown or 2
  76. )*100
  77. )
  78. )
  79. else
  80. return 100
  81. end
  82. end
  83.  
  84. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  85. local V3 = {N=Vector3.new}
  86. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge}
  87.  
  88. local Effects,Sounds = {},{};
  89. --Stop animations
  90. for _,v in next, hum:GetPlayingAnimationTracks() do
  91. v:Stop();
  92. end
  93.  
  94. pcall(game.Destroy,char:FindFirstChild'Animate')
  95. pcall(game.Destroy,hum:FindFirstChild'Animator')
  96.  
  97. -- Sounds
  98. Sounds['Wet'] = {Id=256738023,Loop=false,Pitch=1}
  99. Sounds['Swoosh1'] = {Id=320557353,Loop=false,Pitch=1,Volume=6}
  100. Sounds['Swoosh2'] = {Id=320557382,Loop=false,Pitch=1,Volume=6}
  101. Sounds['Swoosh3'] = {Id=320557413,Loop=false,Pitch=1,Volume=6}
  102. Sounds['Swoosh4'] = {Id=320557453,Loop=false,Pitch=1,Volume=6}
  103. Sounds['Swoosh5'] = {Id=320557487,Loop=false,Pitch=1,Volume=6}
  104. Sounds['Swoosh6'] = {Id=320557537,Loop=false,Pitch=1,Volume=6}
  105. Sounds['Swoosh7'] = {Id=320557563,Loop=false,Pitch=1,Volume=6}
  106. Sounds['Swoosh8'] = {Id=320557518,Loop=false,Pitch=1,Volume=6}
  107. Sounds['SmallBoom'] = {Id=341336485,Loop=false,Volume=5,Pitch=1}
  108. Sounds['ChaosBuster'] = {Id=333534812,Loop=false,Volume=5,Pitch=0.75}
  109. Sounds['Magic'] = {Id=315743350,Loop=false,Volume=5,Pitch=1}
  110. Sounds['ShrekRemix'] = {Id=163306929,Loop=true,Pitch=1,Volume = 4}
  111. Sounds['CreoDimension'] = {Id=927529620,Loop=true,Pitch=1,Volume=4}
  112. Sounds['BlackBlizzard'] = {Id=657626121,Loop=true,Pitch=1,Volume=4}
  113. Sounds['ColbreakzFantasy'] = {Id=876981900,Loop=true,Pitch=1,Volume=4}
  114. Sounds['NeflCrystals'] = {Id=340106355,Loop=true,Pitch=1,Volume=4}
  115. Sounds['EvilMortyRemix'] = {Id=1057401232,Loop=true,Pitch=1,Volume=10}
  116.  
  117. -- Functions
  118. local NewInstance = function(instance,parent,properties)
  119. local inst = Instance.new(instance,parent)
  120. if(properties)then
  121. for i,v in next, properties do
  122. pcall(function() inst[i] = v end)
  123. end
  124. end
  125. return inst;
  126. end
  127.  
  128.  
  129. ArtificialHB = NewInstance("BindableEvent", script,{
  130. Parent = script,
  131. Name = "Heartbeat",
  132. })
  133.  
  134. script:WaitForChild("Heartbeat")
  135.  
  136. frame = 1 / 60
  137. tf = 0
  138. allowframeloss = false
  139. tossremainder = false
  140. lastframe = tick()
  141. script.Heartbeat:Fire()
  142.  
  143. game:GetService("RunService").Heartbeat:connect(function(s, p)
  144. tf = tf + s
  145. if tf >= frame then
  146. if allowframeloss then
  147. script.Heartbeat:Fire()
  148. lastframe = tick()
  149. else
  150. for i = 1, math.floor(tf / frame) do
  151. script.Heartbeat:Fire()
  152. end
  153. lastframe = tick()
  154. end
  155. if tossremainder then
  156. tf = 0
  157. else
  158. tf = tf - frame * math.floor(tf / frame)
  159. end
  160. end
  161. end)
  162.  
  163. function swait(num)
  164. if num == 0 or num == nil then
  165. ArtificialHB.Event:wait()
  166. else
  167. for i = 0, num do
  168. ArtificialHB.Event:wait()
  169. end
  170. end
  171. end
  172.  
  173.  
  174. function clerp(startCF,endCF,alpha)
  175. return startCF:lerp(endCF, alpha)
  176. end
  177. local sndFromData = function(data,parent)
  178. assert(typeof(data) == 'table',"sndFromData's first argument must be a table!")
  179. local snd = NewInstance("Sound",parent or char,{SoundId = "rbxassetid://"..data.Id,Looped=data.Loop or false,Pitch = data.Pitch or 1,Volume = data.Volume or 1})
  180. if(not snd.Looped)then
  181. snd.Ended:connect(function()
  182. snd:Stop()
  183. snd:destroy()
  184. end)
  185. end
  186. return snd;
  187. end
  188. local FX = function(ID,vol,pitch,parent)
  189. return coroutine.wrap(function()
  190. local snd = NewInstance("Sound",parent or torso, {Pitch=pitch or 1, Volume = vol or 1,SoundId = "rbxassetid://"..ID})
  191. snd:Play()
  192.  
  193. delay(snd.TimeLength+2,function()
  194. snd:Stop()
  195. snd:Destroy()
  196. end)
  197. return snd
  198. end)()
  199. end
  200.  
  201. function ClearChildrenWithClass(where,class,recursive)
  202. local children = (recursive and where:GetDescendants() or where:GetChildren())
  203. for _,v in next, children do
  204. if(v:IsA(class))then
  205. v:destroy()
  206. end
  207. end
  208. end
  209.  
  210. function UnbindLoops()
  211. pcall(runService.UnbindFromRenderStep,runService,"N_Effects")
  212. pcall(runService.UnbindFromRenderStep,runService,"N_Animations")
  213. end;
  214.  
  215. UnbindLoops() -- Just so if the loops already exist from previously running a script using this template, there's no errors
  216.  
  217. -- Model
  218. New = function(Object, Parent, Name, Data)
  219. local Object = Instance.new(Object)
  220. for Index, Value in pairs(Data or {}) do
  221. Object[Index] = Value
  222. end
  223. Object.Parent = Parent
  224. Object.Name = Name
  225. return Object
  226. end
  227.  
  228. TenMMPistol = New("Model",char,"10mmPistol",{})
  229. Handle = New("Part",TenMMPistol,"Handle",{Size = Vector3.new(2.75000048, 1.44999957, 0.660000503),CFrame = CFrame.new(-61.3750038, 1.77841592, 91.8999481, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,CanCollide=false,})
  230. Mesh = New("SpecialMesh",Handle,"Mesh",{Scale = Vector3.new(0.00999999978, 0.00999999978, 0.00999999978),MeshId = "rbxassetid://868963093",TextureId = "rbxassetid://868963099",MeshType = Enum.MeshType.FileMesh,})
  231. Part = New("Part",TenMMPistol,"Part",{Size = Vector3.new(0.730002046, 1.20999968, 0.22000052),CFrame = CFrame.new(-60.4236794, 1.56401443, 91.8717957, 0.996477664, -0.0838589668, 0, 0.0838589668, 0.996477664, 0, 0, 0, 1),CanCollide=false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  232. Mesh = New("SpecialMesh",Part,"Mesh",{Scale = Vector3.new(0.0055999998, 0.00600000005, 0.00600000005),MeshId = "rbxassetid://868965101",TextureId = "rbxassetid://868965109",MeshType = Enum.MeshType.FileMesh,})
  233. MagMot = New("Motor",Part,"mot",{Part0 = Part,Part1 = Handle,C0 = CFrame.new(0, 0, 0, 0.996477664, 0.0838589668, 0, -0.0838589668, 0.996477664, 0, 0, 0, 1),C1 = CFrame.new(0.951324463, -0.214401484, -0.0281524658, 1, 0, 0, 0, 1, 0, 0, 0, 1),})
  234.  
  235.  
  236. -- Joints, etc
  237. if(PaintBody)then
  238. char['Body Colors'].LeftArmColor = BrickColor.new(PaintBody)
  239. char['Body Colors'].RightArmColor = BrickColor.new(PaintBody)
  240. char['Body Colors'].LeftLegColor = BrickColor.new(PaintBody)
  241. char['Body Colors'].RightLegColor = BrickColor.new(PaintBody)
  242. char['Body Colors'].TorsoColor = BrickColor.new(PaintBody)
  243. char['Body Colors'].HeadColor = BrickColor.new(PaintBody)
  244. end
  245. if(PlayerSize ~= 1)then
  246. for _,v in next, char:GetDescendants() do
  247. if(v:IsA'BasePart')then
  248. v.Size = v.Size * PlayerSize
  249. end
  250. end
  251. end
  252.  
  253. local LS = NewInstance('Motor',char,{Part0=torso,Part1=larm,C0 = CF.N(-1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  254. local RS = NewInstance('Motor',char,{Part0=torso,Part1=rarm,C0 = CF.N(1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
  255. local NK = NewInstance('Motor',char,{Part0=torso,Part1=head,C0 = CF.N(0,1.5 * PlayerSize,0)})
  256. local LH = NewInstance('Motor',char,{Part0=torso,Part1=lleg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  257. local RH = NewInstance('Motor',char,{Part0=torso,Part1=rleg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
  258. local RJ = NewInstance('Motor',char,{Part0=root,Part1=torso})
  259. local HW = NewInstance('Motor',char,{Part0=rarm,Part1=Handle,C0 = CF.N(0,-2,-.25)*CF.A(M.R(-90),M.R(-90),0)})
  260. -- watevr
  261.  
  262. -- Default C0s
  263. local LSD=LS.C0
  264. local RSD=RS.C0
  265. local HD=NK.C0
  266. local TD=RJ.C0
  267. local LHD=LH.C0
  268. local RHD=RH.C0
  269.  
  270. -- Check State
  271. function CheckState(rPart)
  272. if(rPart.Velocity.y > .35 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
  273. return 'Jump';
  274. elseif(rPart.Velocity.y < -.35 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
  275. return 'Fall';
  276. elseif(math.abs(rPart.Velocity.x) > 2 or math.abs(rPart.Velocity.z) > 2 and hum:GetState() ~= Enum.HumanoidStateType.Freefall)then
  277. return 'Walk';
  278. end
  279. return 'Idle';
  280. end
  281.  
  282. -- Effect Functions
  283. function SphereFX(duration,color,scale,pos,endScale)
  284. local rng = Instance.new("Part", char)
  285. rng.Anchored = true
  286. rng.BrickColor = color
  287. rng.CanCollide = false
  288. rng.FormFactor = 3
  289. rng.Name = "Ring"
  290. rng.Size = Vector3.new(1,1,1)
  291. rng.Transparency = 0
  292. rng.TopSurface = 0
  293. rng.BottomSurface = 0
  294. rng.CFrame = pos
  295. local rngm = Instance.new("SpecialMesh", rng)
  296. rngm.MeshType = "Sphere"
  297. rngm.Scale = scale
  298. table.insert(Effects, {Frame = 0, Effect="Sphere", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale, EndScale = endScale or scale*2, Position = pos})
  299. return rng
  300. end
  301.  
  302. function BlastFX(duration,color,scale,pos,endScale)
  303. local rng = Instance.new("Part", char)
  304. rng.Anchored = true
  305. rng.BrickColor = color
  306. rng.CanCollide = false
  307. rng.FormFactor = 3
  308. rng.Name = "Ring"
  309. rng.Size = Vector3.new(1,1,1)
  310. rng.Transparency = 0
  311. rng.TopSurface = 0
  312. rng.BottomSurface = 0
  313. rng.CFrame = pos
  314. local rngm = Instance.new("SpecialMesh", rng)
  315. rngm.MeshType = "FileMesh"
  316. rngm.MeshId = 'rbxassetid://20329976'
  317. rngm.Scale = scale
  318. table.insert(Effects, {Frame = 0, Effect="Sphere", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale, EndScale = endScale or scale*2, Position = pos})
  319. return rng
  320. end
  321.  
  322. function BlockFX(duration,color,scale,pos,endScale)
  323. local rng = Instance.new("Part", char)
  324. rng.Anchored = true
  325. rng.BrickColor = color
  326. rng.CanCollide = false
  327. rng.FormFactor = 3
  328. rng.Name = "Ring"
  329. rng.Size = Vector3.new(1,1,1)
  330. rng.Transparency = 0
  331. rng.TopSurface = 0
  332. rng.BottomSurface = 0
  333. rng.CFrame = pos
  334. local rngm = Instance.new("BlockMesh", rng)
  335. rngm.Scale = scale
  336. table.insert(Effects, {Frame = 0, Effect="Block", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale, EndScale = endScale or scale*2, Position = pos})
  337. return rng
  338. end
  339.  
  340.  
  341. function BloodDrop(pos,dir,maxsize)
  342. local owo = NewInstance("Part",char,{Material=BloodMaterial,BrickColor=BloodColor,Shape=Enum.PartType.Ball,Size=V3.N(.25,.25,.25), CanCollide = false})
  343. owo.CFrame=CF.N(pos,dir)
  344. local bv = Instance.new("BodyVelocity",owo)
  345. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  346. bv.velocity = CF.N(pos,dir+V3.N(M.RNG(-3,3)/30,M.RNG(-3,3)/30,M.RNG(-3,3)/30)).lookVector*15
  347. bv.Name = "MOVE"
  348. game:service'Debris':AddItem(bv,0.05)
  349. local touch
  350. touch = owo.Touched:connect(function(hit)
  351. if(hit.Anchored==true and hit.CanCollide and not hit.Parent:FindFirstChildOfClass'Humanoid')then
  352. touch:disconnect()
  353. BloodPuddle(owo.Position+V3.N(0,1,0),10,maxsize,owo)
  354. owo:destroy()
  355. end
  356. end)
  357. end
  358. function BloodPuddle(position,range,maxSize,where)
  359. local hit, pos, norm = workspace:FindPartOnRayWithIgnoreList(Ray.new(
  360. position,CF.N(position,position+V3.N(0,-1,0)).lookVector * range
  361. ),{where,char},false,true)
  362. if(hit)then
  363. if(BloodPuddles[hit])then
  364. BloodPuddles[hit].Frame = 0
  365. if(hit:FindFirstChild'CylinderMesh' and hit.CylinderMesh.Scale.Z < BloodPuddles[hit].MaxSize)then
  366. hit.CylinderMesh.Scale = hit.CylinderMesh.Scale + V3.N(.1,0,.1)
  367. end
  368. else
  369. local Puddle = NewInstance('Part',workspace,{Material=BloodMaterial,BrickColor=BloodColor,Size=V3.N(1,.1,1),CFrame=CF.N(pos,pos+norm)*CF.A(90*M.P/180,0,0),Anchored=true,CanCollide=false,Archivable=false,Locked=true,Name='BloodPuddle'})
  370. local Cyl = NewInstance('CylinderMesh',Puddle,{Name='CylinderMesh'})
  371. BloodPuddles[Puddle] = {MaxSize=maxSize or 7,Frame=0}
  372. end
  373. end
  374. end
  375.  
  376. function LaserFX(duration,color,cframe,scale,endScale)
  377. local rng = Instance.new("Part", char)
  378. rng.Anchored = true
  379. rng.BrickColor = color
  380. rng.CanCollide = false
  381. rng.FormFactor = 3
  382. rng.Material = Enum.Material.Neon
  383. rng.Name = "Laser"
  384. rng.Size = Vector3.new(.5,.5,.5)
  385. rng.Transparency = 0
  386. rng.TopSurface = 0
  387. rng.BottomSurface = 0
  388. rng.CFrame = cframe
  389. local rngm = Instance.new("CylinderMesh", rng)
  390. rngm.Scale = scale
  391. table.insert(Effects, {Frame = 0, Effect="Sphere", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale, EndScale = endScale or scale*2, Position = cframe})
  392. return rng
  393. end
  394.  
  395. function ShatterFX(duration,color,scale,cframe)
  396. local rng = Instance.new("Part", char)
  397. rng.Anchored = true
  398. rng.BrickColor = color
  399. rng.CanCollide = false
  400. rng.FormFactor = 3
  401. rng.Name = "Ring"
  402. rng.Size = Vector3.new(1,1,1)
  403. rng.Transparency = 0
  404. rng.TopSurface = 0
  405. rng.BottomSurface = 0
  406. rng.CFrame = cframe * CF.fEA(M.RNG(-50, 50), M.RNG(-50, 50), M.RNG(-50, 50))
  407. local rngm = Instance.new("SpecialMesh", rng)
  408. rngm.Scale = scale
  409. rngm.MeshType = "Sphere"
  410. table.insert(Effects, {Frame = 0, Effect="Shatter", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale,Position=rng.CFrame})
  411. end
  412.  
  413. function RingFX(duration,color,scale,pos,endScale)
  414. local type = type
  415. local rng = Instance.new("Part", char)
  416. rng.Anchored = true
  417. rng.BrickColor = color
  418. rng.CanCollide = false
  419. rng.FormFactor = 3
  420. rng.Name = "Ring"
  421. rng.Size = Vector3.new(1,1,1)
  422. rng.Transparency = 0
  423. rng.TopSurface = 0
  424. rng.BottomSurface = 0
  425. rng.CFrame = pos
  426. local rngm = Instance.new("SpecialMesh", rng)
  427. rngm.MeshId = "rbxassetid://3270017"
  428. rngm.Scale = scale
  429. table.insert(Effects, {Frame = 0, Effect="Sphere", Duration = duration or 30, Part=rng, Mesh = rngm, Scale = scale, EndScale = endScale or scale*2, Position = pos})
  430. return rng
  431. end
  432.  
  433. function Shoot(StartCF,EndCF,Spread,Speed,Num,Color,Drop,MinDamage,MaxDamage,HeadshotMult,size)
  434. local Spread = V3.N(M.RNG(-Spread,Spread),M.RNG(-Spread,Spread),M.RNG(-Spread,Spread))
  435. local Start = StartCF.p
  436. local End = EndCF.p
  437. local SpreadPos = End + Spread
  438. local Look = CF.N((Start + SpreadPos) / 2, SpreadPos)
  439. local Count = Num
  440. spawn(function()
  441. repeat
  442. wait()
  443. local hit, pos = workspace:findPartOnRay(Ray.new(
  444. Start,(Look.lookVector).unit * Speed
  445. ),char,false,true)
  446. local dist = (Start-pos).magnitude
  447. local yScale = dist * (Speed / (Speed/2))
  448. local aa = CF.N((Start + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0)
  449. LaserFX(25,Color,aa,size + Vector3.new(0,yScale,0),Vector3.new(-size.x,yScale,-size.z))
  450. Start = Start + Look.lookVector * Speed
  451. Look = Look * CF.A(M.R(Drop or -1),0,0)
  452. Count = Count - 1
  453.  
  454. if(hit)then
  455. Count = 0
  456. if(hit.Parent:FindFirstChildOfClass'Humanoid')then
  457. if(hit.Name == 'Head' or AbuseMode)then
  458.  
  459. DealDamage(hit.Parent,MinDamage * (HeadshotMult or 1),MaxDamage * (HeadshotMult or 1),0,'Normal')
  460. if(hit.Parent:FindFirstChildOfClass'Humanoid'.Health <= 0 or AbuseMode)then
  461. hit.Parent:breakJoints()
  462. FX(429400881,1,1,hit).PlayOnRemove = true
  463. hit:destroy()
  464. for i = 1, 15 do
  465. local spread = V3.N(M.RNG(-85,85),M.RNG(-85,85),M.RNG(-85,85))
  466. BloodDrop(pos,pos+spread,10)
  467. end
  468. end
  469. else
  470. --MagniDamage(pos,10,MinDamage,MaxDamage,0,'Normal')
  471. DealDamage(hit.Parent,MinDamage,MaxDamage,0,'Normal')
  472. end
  473. end
  474. end
  475. if(Count <= 0)then
  476. BlockFX(30,Color,size,CF.N(pos),V3.N(0,0,0))
  477. end
  478. until Count <= 0
  479. end)
  480. end
  481.  
  482. -- Effect Loop
  483.  
  484. runService:BindToRenderStep("N_Effects",Enum.RenderPriority.Character.Value + 2,function()
  485. for _,data in next, Effects do
  486. local frame,effect,duration = data.Frame,data.Effect,data.Duration
  487. local transparency = (frame / duration)
  488. local opacity = 1 - transparency
  489. if(frame > duration)then
  490. Effects[_] = nil
  491. end
  492. frame = frame + 1
  493. data.Frame = frame
  494. if(effect == 'Sphere')then
  495. local Part,Mesh,Scale,CF,eScale = data.Part,data.Mesh,data.Scale,data.Position,data.EndScale
  496. Mesh.Scale = Mesh.Scale:lerp(eScale, transparency/6)
  497. Part.Transparency = transparency
  498. if(frame > duration)then
  499. Part:destroy()
  500. end
  501. elseif(effect == 'Shatter')then
  502. local Part,Mesh,Scale,Position,Thingie,Thingie2,Inc = data.Part,
  503. data.Mesh,
  504. data.Scale,
  505. data.Position,
  506. (data.Thingie or 0),
  507. (data.Thingie2 or M.RNG(50, 100) / 100),
  508. (data.Inc or M.RNG() - M.RNG())
  509. Part.Transparency = transparency
  510. Position = Position * CF.N(0,Thingie2,0)
  511. Part.CFrame = Position * CF.fEA(Thingie,0,0)
  512. Thingie = Thingie + Inc
  513.  
  514. data.Position = Position
  515. data.Thingie = Thingie
  516. data.Thingie2 = Thingie2
  517. data.Inc = Inc
  518. elseif(effect == 'Block')then
  519. local Part,Mesh,Scale,CF,eScale = data.Part,data.Mesh,data.Scale,data.Position,data.EndScale
  520. Mesh.Scale = Mesh.Scale:lerp(eScale, transparency/6)
  521. Part.Transparency = transparency
  522. Part.CFrame = CF * CFrame.Angles(M.R(M.RNG(-360,360)),M.R(M.RNG(-360,360)),M.R(M.RNG(-360,360)))
  523. if(frame > duration)then
  524. Part:destroy()
  525. end
  526. end
  527. end
  528. for puddle,data in next, BloodPuddles do
  529. if(puddle.Transparency > 0.9)then
  530. BloodPuddles[puddle] = nil
  531. puddle:destroy()
  532. end
  533. data.Frame = data.Frame + 1
  534. if(data.Frame > 105)then
  535. local trans = (data.Frame-105)/90
  536. puddle.Transparency = trans
  537. if(puddle:FindFirstChild'CylinderMesh' and puddle.CylinderMesh.Scale.Z > 0)then
  538. puddle.CylinderMesh.Scale = puddle.CylinderMesh.Scale-V3.N(.1,0,.1)
  539. end
  540. else
  541. puddle.Transparency = 0
  542. end
  543. end
  544. end)
  545.  
  546. print("This script is best experienced with Shift Lock")
  547. print("Press F to switch between first and third person (not finished yet)")
  548. -- Animation Loop
  549. runService:BindToRenderStep("N_Animations",Enum.RenderPriority.Character.Value + 1,function()
  550. sine=sine+change
  551. local wsVal = 5 / (hum.WalkSpeed / 16)
  552. local exactVel = CFrame.new(root.CFrame:vectorToObjectSpace(root.Velocity))
  553. local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(root.CFrame.p,((CFrame.new(root.Position,root.Position - Vector3.new(0,1,0))).lookVector).unit * 4), char)
  554. local State = (not hitfloor and root.Velocity.y < -1 and "Fall" or not hitfloor and root.Velocity.y > 1 and "Jump" or hitfloor and (math.abs(root.Velocity.x) > 1 or math.abs(root.Velocity.z) > 1) and "Walk" or hitfloor and "Idle")
  555. -- game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(game.Players.LocalPlayer.Character.Torso.Position,Vector3.new(mouse.Hit.p.x,game.Players.LocalPlayer.Character.Torso.Position.y,mouse.Hit.p.z))
  556.  
  557. if(State == 'Walk')then
  558. change = 2/3
  559. --CF.N(0,1 * PlayerSize,0)
  560. RH.C1 = RH.C1:lerp(CF.N(0,.985+.4*M.C(sine/wsVal),-.1*M.S(sine/9)* M.R(exactVel.z) )*CF.A(M.S(sine/wsVal)*-M.R(exactVel.z)*1.5,0,-M.S(sine/wsVal)*-M.R(exactVel.x)),.2)
  561. LH.C1 = LH.C1:lerp(CF.N(0,.985-.4*M.C(sine/wsVal),.1*-M.S(sine/9)* -M.R(exactVel.z) )*CF.A(-M.S(sine/wsVal)*-M.R(exactVel.z)*1.5,0,M.S(sine/wsVal)*-M.R(exactVel.x)),.2)
  562. else
  563. RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2)
  564. LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2)
  565. end
  566. LS.C1 = CF.N(0,.5,0) * CF.fEA(-math.asin((mouse.Hit.p-mouse.Origin.p).unit.y),0,0)
  567. RS.C1 = CF.N(0,.5,0) * CF.fEA(-math.asin((mouse.Hit.p-mouse.Origin.p).unit.y),0,0)
  568. NK.C1 = CF.fEA(-math.asin((mouse.Hit.p-mouse.Origin.p).unit.y),0,0)
  569.  
  570. if(neutralAnims)then
  571. if(State == 'Idle')then
  572. -- Idle anim
  573. RJ.C0 = RJ.C0:lerp(CF.N(),.1)
  574. LS.C0 = LS.C0:lerp(LSD*CF.N(1.2,0,-.5)*CF.A(M.R(90),0,M.R(65)),.1)
  575. RS.C0 = RS.C0:lerp(RSD*CF.N(0,0,.25)*CF.A(M.R(90),0,0),.1)
  576. RH.C0 = RH.C0:lerp(RHD,.1)
  577. LH.C0 = LH.C0:lerp(LHD,.1)
  578. NK.C0 = NK.C0:lerp(HD,.1)
  579. elseif(State == 'Walk')then
  580. -- Walk anim
  581. RJ.C0 = RJ.C0:lerp(CF.A(0,0+.2*M.S(sine/wsVal),0)*CF.N(0,0+.2*M.S(sine/(wsVal/2)),0),.1)
  582. LS.C0 = LS.C0:lerp(LSD*CF.N(1.2,0,-.5)*CF.A(M.R(90),0,M.R(65)),.1)
  583. RS.C0 = RS.C0:lerp(RSD*CF.N(0,0,.25)*CF.A(M.R(90),0,0),.1)
  584. RH.C0 = RH.C0:lerp(RHD,.1)
  585. LH.C0 = LH.C0:lerp(LHD,.1)
  586. NK.C0 = NK.C0:lerp(HD,.1)
  587. elseif(State == 'Jump')then
  588. RJ.C0 = RJ.C0:lerp(CF.N(),.1)
  589. LS.C0 = LS.C0:lerp(LSD*CF.A(M.R(25),0,M.R(-25)),.1)
  590. RS.C0 = RS.C0:lerp(RSD*CF.A(M.R(65),0,M.R(-35)),.1)
  591. LH.C0 = LH.C0:lerp(LHD*CF.A(M.R(-25),0,0),.1)
  592. RH.C0 = RH.C0:lerp(RHD*CF.A(M.R(-25),0,0),.1)
  593. NK.C0 = NK.C0:lerp(HD,.1)
  594. elseif(State == 'Fall')then
  595. RJ.C0 = RJ.C0:lerp(CF.N(),.1)
  596. LS.C0 = LS.C0:lerp(LSD*CF.A(M.R(-25),0,M.R(-25)),.1)
  597. RS.C0 = RS.C0:lerp(RSD*CF.A(M.R(65),M.R(45),M.R(-35)),.1)
  598. LH.C0 = LH.C0:lerp(LHD*CF.A(M.R(25),0,M.R(0)),.1)
  599. RH.C0 = RH.C0:lerp(RHD*CF.A(M.R(25),0,M.R(0)),.1)
  600. NK.C0 = NK.C0:lerp(HD,.1)
  601. end
  602. end
  603. end)
  604.  
  605. -- Died event
  606.  
  607. hum.Died:connect(function() -- When the player dies
  608. UnbindLoops() -- Unbind all of the loops used
  609. end)
  610.  
  611.  
  612. -- Everything else
  613.  
  614. function getMouseDir()
  615. return {CF.N(root.Position, Vector3.new(mouse.Hit.p.x,root.Position.y,mouse.Hit.p.z))}
  616. end
  617.  
  618. function getDirection()
  619. local Cam = workspace.CurrentCamera
  620. return {
  621. CFrame.new(root.Position, Vector3.new(Cam.CoordinateFrame.x, root.Position.y, Cam.CoordinateFrame.z)) * CFrame.fromEulerAnglesXYZ(0, math.pi, 0),
  622. Vector3.new(Cam.CoordinateFrame.p.x, root.CFrame.p.y, Cam.CoordinateFrame.p.z)
  623. }
  624. end
  625.  
  626. function FaceMouse()
  627. root.CFrame = root.CFrame:lerp(getMouseDir()[1],.1)
  628. end
  629.  
  630. function GetTorso(char)
  631. return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart'
  632. end
  633.  
  634. function DealDamage(who,minDam,maxDam,Knock,Type)
  635. if(who)then
  636. local hum = who:FindFirstChildOfClass'Humanoid'
  637. local Damage = M.RNG(minDam,maxDam)
  638. local canHit = true
  639. if(hum)then
  640. for _, p in pairs(Hit) do
  641. if p[1] == hum then
  642. if(time() - p[2] < 0.1) then
  643. canHit = false
  644. else
  645. Hit[_] = nil
  646. end
  647. end
  648. end
  649. if(canHit)then
  650. if(hum.Health >= math.huge)then
  651. who:BreakJoints()
  652. else
  653. local player = S.Players:GetPlayerFromCharacter(who)
  654. if(not player or not Teamed[player])then
  655. if(Type == "Fire")then
  656. --idk..
  657. else
  658. local c = Instance.new("ObjectValue",hum)
  659. c.Name = "creator"
  660. c.Value = plr
  661. game:service'Debris':AddItem(c,0.35)
  662. hum.Health = hum.Health - Damage
  663. if(Type == 'Knockback' and GetTorso(who))then
  664. local angle = GetTorso(who).Position - root.Position + Vector3.new(0, 0, 0).unit
  665. local body = NewInstance('BodyVelocity',GetTorso(who),{
  666. P = 500,
  667. maxForce = V3.N(math.huge,0,math.huge),
  668. velocity = root.CFrame.lookVector * Knock + root.Velocity / 1.05
  669. })
  670. game:service'Debris':AddItem(body,.5)
  671. elseif(Type == 'Knockdown' and GetTorso(who))then
  672. local rek = GetTorso(who)
  673. print(rek)
  674. hum.PlatformStand = true
  675. delay(1,function()
  676. hum.PlatformStand = false
  677. end)
  678. local angle = (GetTorso(who).Position - (root.Position + Vector3.new(0, 0, 0))).unit
  679. local bodvol = NewInstance("BodyVelocity",rek,{
  680. velocity = angle * Knock,
  681. P = 5000,
  682. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  683. })
  684. local rl = NewInstance("BodyAngularVelocity",rek,{
  685. P = 3000,
  686. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  687. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  688. })
  689. game:GetService("Debris"):AddItem(bodvol, .5)
  690. game:GetService("Debris"):AddItem(rl, .5)
  691. end
  692. end
  693. end
  694. end
  695. table.insert(Hit,{hum,time()})
  696. end
  697. end
  698. end
  699. end
  700.  
  701. function MagniDamage(pos,radius,mindamage,maxdamage,knockback,damagetype)
  702. local Recursive
  703. Recursive = function(whom)
  704. for _,c in next, whom:children() do
  705. local hum = c:FindFirstChildOfClass'Humanoid'
  706. local hed = c:FindFirstChild'Torso' or c:FindFirstChild'UpperTorso' or c:FindFirstChild'LowerTorso'
  707. if(hum and hed)then
  708. local mag = (hed.CFrame.p - pos).magnitude
  709. if(mag <= radius and c ~= char)then
  710. DealDamage(c,mindamage,maxdamage,knockback,damagetype)
  711. end
  712. end
  713. Recursive(c)
  714. end
  715. end
  716. Recursive(workspace)
  717. end
  718.  
  719. function MagniHeal(pos,radius,heal,needsTeamed)
  720. for _,v in next, workspace:GetDescendants() do
  721. local player = S.Players:GetPlayerFromCharacter(v)
  722. local hum = v:FindFirstChildOfClass'Humanoid'
  723. if(hum and v:IsA'Model')then
  724. if(not needsTeamed or player and (not plr.Neutral and player.TeamColor == plr.TeamColor))then
  725. local pp = v.PrimaryPart or v:FindFirstChild'Torso' or v:FindFirstChild'UpperTorso' or v:FindFirstChild'LowerTorso'
  726. if(pp and (pp.CFrame.p-pos).magnitude <= radius)then
  727. hum.Health = hum.Health + heal
  728. end
  729. end
  730. end
  731. end
  732. end
  733.  
  734.  
  735. Debounces:New('how2use',1) -- name, cooldown
  736.  
  737. function TestDebounce()
  738. if(Debounces:Get('how2use').Usable)then
  739. -- code
  740. Debounces:Get('how2use'):Use() -- use it up
  741. end
  742. end
  743. function ClickCombo()
  744. Attack = true
  745. neutralAnims = false
  746. if(combo == 1)then
  747. -- combo 1
  748. combo = 2
  749. elseif(combo == 2)then
  750. -- combo 2
  751. -- etc, etc
  752. combo = 1
  753. end
  754. lastClick = time()
  755. neutralAnims = true
  756. Attack = false
  757. end
  758. function FireGun()
  759. --Shoot(rarm.CFrame * CFrame.new(0,-1.5,0),mouse.Hit,0,500,30,BrickColor.new(ModeColor),-1,15,30)
  760. --BlockFX(duration,color,scale,pos,endScale)
  761. local origin =Handle.CFrame*CF.N(-1.5,.5,0)
  762. FX(149915226,3,1,Handle)
  763. BlockFX(15,BrickColor.new'Bright yellow',V3.N(.5,.5,.5),origin,V3.N(0,0,0))
  764. BlockFX(15,BrickColor.new'Deep orange',V3.N(.5,.5,.5),origin,V3.N(0,0,0))
  765. Shoot(origin,mouse.Hit,0,50,250,BrickColor.new'New Yeller',-1,15,30,2,V3.N(.35,.35,.35))
  766. end
  767. mouse.Button1Down:connect(function()
  768. if(Attack)then return end
  769. FireGun()
  770. end)
  771. mouse.KeyDown:connect(function(k)
  772. if(Attack)then return end
  773. if(k == ';')then
  774. AbuseMode = not AbuseMode
  775. print("Abuse mode is ".. (AbuseMode == true and "on" or "off"))
  776. elseif(k == 'f')then -- never finished
  777. FPS = not FPS
  778. end
  779. end)
  780.  
  781. runService.RenderStepped:connect(function()
  782. if(not Attack and combo ~= 1 and time()-lastClick > 0.4)then
  783. combo = 1
  784. end
  785. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement