soins1

idk lol

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