Advertisement
Guest User

[Lua] Kirby Script

a guest
Feb 16th, 2019
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. do
  4. print("FE Compatibility code by Mokiros | Translated to FE by shazzam55")
  5. script.Parent = Player.Character
  6.  
  7. --RemoteEvent for communicating
  8. local Event = Instance.new("RemoteEvent")
  9. Event.Name = "UserInput_Event"
  10.  
  11. --Fake event to make stuff like Mouse.KeyDown work
  12. local function fakeEvent()
  13. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  14. t.connect = t.Connect
  15. return t
  16. end
  17.  
  18. --Creating fake input objects with fake variables
  19. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  20. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  21. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  22. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  23. end}
  24. --Merged 2 functions into one by checking amount of arguments
  25. CAS.UnbindAction = CAS.BindAction
  26.  
  27. --This function will trigger the events that have been :Connect()'ed
  28. local function te(self,ev,...)
  29. local t = m[ev]
  30. if t and t._fakeEvent and t.Function then
  31. t.Function(...)
  32. end
  33. end
  34. m.TrigEvent = te
  35. UIS.TrigEvent = te
  36.  
  37. Event.OnServerEvent:Connect(function(plr,io)
  38. if plr~=Player then return end
  39. if io.isMouse then
  40. m.Target = io.Target
  41. m.Hit = io.Hit
  42. else
  43. local b = io.UserInputState == Enum.UserInputState.Begin
  44. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  45. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  46. end
  47. for _,t in pairs(CAS.Actions) do
  48. for _,k in pairs(t.Keys) do
  49. if k==io.KeyCode then
  50. t.Function(t.Name,io.UserInputState,io)
  51. end
  52. end
  53. end
  54. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  55. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  56. end
  57. end)
  58. Event.Parent = NLS([==[
  59. local Player = game:GetService("Players").LocalPlayer
  60. local Event = script:WaitForChild("UserInput_Event")
  61.  
  62. local UIS = game:GetService("UserInputService")
  63. local input = function(io,a)
  64. if a then return end
  65. --Since InputObject is a client-side instance, we create and pass table instead
  66. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  67. end
  68. UIS.InputBegan:Connect(input)
  69. UIS.InputEnded:Connect(input)
  70.  
  71. local Mouse = Player:GetMouse()
  72. local h,t
  73. --Give the server mouse data 30 times every second, but only if the values changed
  74. --If player is not moving their mouse, client won't fire events
  75. while wait(1/30) do
  76. if h~=Mouse.Hit or t~=Mouse.Target then
  77. h,t=Mouse.Hit,Mouse.Target
  78. Event:FireServer({isMouse=true,Target=t,Hit=h})
  79. end
  80. end]==],Player.Character)
  81. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  82. end
  83. -----------------------
  84. --[[ Name : Kirby ]]--
  85. -------------------------------------------------------
  86. --A script By makhail07
  87. --Footplanting added by Nebula_Zorua (Nebula the Zorua#6969)
  88.  
  89. --Discord Creterisk#2958
  90.  
  91. --NOTE THIS SCRIPT WAS PURELY MADE FROM MY FUCKING IMAGINATION
  92. --IF IT HAPPENS TO LOOK LIKE ANOTHER SCRIPT
  93. --DONT CALL IT A FUCKING BOOTLEG THANK YOU AND ENJOY THE SCRIPT
  94. --YOU FUCKING SKIDS,
  95. --For Those who log/decompile this, If you sell or trade this,
  96. --and I find out who you are, i will take massive action.
  97. -------------------------------------------------------
  98.  
  99. local FavIDs = {
  100. 340106355, --Nefl Crystals
  101. 927529620, --Dimension
  102. 876981900, --Fantasy
  103. 398987889, --Ordinary Days
  104. 1117396305, --Oh wait, it's you.
  105. 885996042, --Action Winter Journey
  106. 919231299, --Sprawling Idiot Effigy
  107. 743466274, --Good Day Sunshine
  108. 727411183, --Knife Fight
  109. 1402748531, --The Earth Is Counting On You!
  110. 595230126 --Robot Language
  111. }
  112.  
  113.  
  114.  
  115. --The reality of my life isn't real but a Universe -makhail07
  116. wait()
  117. local plr = owner
  118. print('Local Kirbo is '..plr.Name)
  119. print'press z to sprint'
  120. local char = plr.Character
  121. local hum = char.Humanoid
  122. local ra = char["Right Arm"]
  123. local la= char["Left Arm"]
  124. local rl= char["Right Leg"]
  125. local ll = char["Left Leg"]
  126. local hed = char.Head
  127. local root = char.HumanoidRootPart
  128. local rootj = root.RootJoint
  129. local tors = char.Torso
  130. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  131. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  132. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  133.  
  134.  
  135. -------------------------------------------------------
  136. --Start Good Stuff--
  137. -------------------------------------------------------
  138. CF = CFrame.new
  139. angles = CFrame.Angles
  140. attack = false
  141. Euler = CFrame.fromEulerAnglesXYZ
  142. Rad = math.rad
  143. IT = Instance.new
  144. BrickC = BrickColor.new
  145. Cos = math.cos
  146. Acos = math.acos
  147. Sin = math.sin
  148. Asin = math.asin
  149. Abs = math.abs
  150. Mrandom = math.random
  151. Floor = math.floor
  152. -------------------------------------------------------
  153. --End Good Stuff--
  154. -------------------------------------------------------
  155. necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  156. RSH, LSH = nil, nil
  157. RW = Instance.new("Weld")
  158. LW = Instance.new("Weld")
  159. RH = tors["Right Hip"]
  160. LH = tors["Left Hip"]
  161. RSH = tors["Right Shoulder"]
  162. LSH = tors["Left Shoulder"]
  163. RSH.Parent = nil
  164. LSH.Parent = nil
  165. RW.Name = "RW"
  166. RW.Part0 = tors
  167. RW.C0 = CF(1.5, 0.5, 0)
  168. RW.C1 = CF(0, 0.5, 0)
  169. RW.Part1 = ra
  170. RW.Parent = tors
  171. LW.Name = "LW"
  172. LW.Part0 = tors
  173. LW.C0 = CF(-1.5, 0.5, 0)
  174. LW.C1 = CF(0, 0.5, 0)
  175. LW.Part1 = la
  176. LW.Parent = tors
  177. Effects = {}
  178.  
  179. local BC = char["Body Colors"]
  180. BC.HeadColor = BrickColor.new("Carnation pink")
  181. BC.LeftArmColor = BrickColor.new("Carnation pink")
  182. BC.LeftLegColor = BrickColor.new("Really red")
  183. BC.RightArmColor = BrickColor.new("Carnation pink")
  184. BC.RightLegColor = BrickColor.new("Really red")
  185. BC.TorsoColor = BrickColor.new("Carnation pink")
  186.  
  187. hed.Transparency = 1
  188.  
  189. if hed:FindFirstChildWhichIsA("Decal") then
  190. hed:FindFirstChildWhichIsA("Decal"):Destroy()
  191. end
  192.  
  193.  
  194. tors.BottomSurface = "Smooth"
  195. tors.LeftSurface = "Smooth"
  196. tors.RightSurface = "Smooth"
  197. tors.TopSurface = "Smooth"
  198.  
  199. ra.BottomSurface = "Smooth"
  200. ra.LeftSurface = "Smooth"
  201. ra.RightSurface = "Smooth"
  202. ra.TopSurface = "Smooth"
  203.  
  204. la.BottomSurface = "Smooth"
  205. la.LeftSurface = "Smooth"
  206. la.RightSurface = "Smooth"
  207. la.TopSurface = "Smooth"
  208.  
  209. rl.BottomSurface = "Smooth"
  210. rl.TopSurface = "Smooth"
  211.  
  212. ll.BottomSurface = "Smooth"
  213. ll.TopSurface = "Smooth"
  214.  
  215. local Haed = Instance.new("SpecialMesh")
  216. Haed.Parent = tors
  217. Haed.MeshType = "Sphere"
  218. Haed.Scale = Vector3.new(1.5,1.5,3)
  219.  
  220. local Leg1 = Instance.new("SpecialMesh")
  221. Leg1.Parent = rl
  222. Leg1.MeshType = "Sphere"
  223. Leg1.Scale = Vector3.new(1,0.5,2)
  224.  
  225. local Leg2 = Instance.new("SpecialMesh")
  226. Leg2.Parent = ll
  227. Leg2.MeshType = "Sphere"
  228. Leg2.Scale = Vector3.new(1,0.5,2)
  229.  
  230. local Arm1 = Instance.new("SpecialMesh")
  231. Arm1.Parent = ra
  232. Arm1.MeshType = "Sphere"
  233. Arm1.Scale = Vector3.new(1,0.8,1)
  234.  
  235. local Arm2 = Instance.new("SpecialMesh")
  236. Arm2.Parent = la
  237. Arm2.MeshType = "Sphere"
  238. Arm2.Scale = Vector3.new(1,0.8,1)
  239.  
  240. local faic = Instance.new("Decal")
  241. faic.Parent = tors
  242. faic.Face = "Front"
  243. faic.Texture = "http://www.roblox.com/asset/?id=32139835"
  244.  
  245. -------------------------------------------------------
  246. --Start HeartBeat--
  247. -------------------------------------------------------
  248. ArtificialHB = Instance.new("BindableEvent", script)
  249. ArtificialHB.Name = "Heartbeat"
  250. script:WaitForChild("Heartbeat")
  251.  
  252. frame = 1 / 60
  253. tf = 0
  254. allowframeloss = false
  255. tossremainder = false
  256.  
  257.  
  258. lastframe = tick()
  259. script.Heartbeat:Fire()
  260.  
  261.  
  262. game:GetService("RunService").Heartbeat:connect(function(s, p)
  263. tf = tf + s
  264. if tf >= frame then
  265. if allowframeloss then
  266. script.Heartbeat:Fire()
  267. lastframe = tick()
  268. else
  269. for i = 1, math.floor(tf / frame) do
  270. script.Heartbeat:Fire()
  271. end
  272. lastframe = tick()
  273. end
  274. if tossremainder then
  275. tf = 0
  276. else
  277. tf = tf - frame * math.floor(tf / frame)
  278. end
  279. end
  280. end)
  281. -------------------------------------------------------
  282. --End HeartBeat--
  283. -------------------------------------------------------
  284.  
  285. -------------------------------------------------------
  286. --Start Important Functions--
  287. -------------------------------------------------------
  288.  
  289. function thread(f)
  290. coroutine.resume(coroutine.create(f))
  291. end
  292. function clerp(a, b, t)
  293. local qa = {
  294. QuaternionFromCFrame(a)
  295. }
  296. local qb = {
  297. QuaternionFromCFrame(b)
  298. }
  299. local ax, ay, az = a.x, a.y, a.z
  300. local bx, by, bz = b.x, b.y, b.z
  301. local _t = 1 - t
  302. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  303. end
  304. function QuaternionFromCFrame(cf)
  305. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  306. local trace = m00 + m11 + m22
  307. if trace > 0 then
  308. local s = math.sqrt(1 + trace)
  309. local recip = 0.5 / s
  310. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  311. else
  312. local i = 0
  313. if m00 < m11 then
  314. i = 1
  315. end
  316. if m22 > (i == 0 and m00 or m11) then
  317. i = 2
  318. end
  319. if i == 0 then
  320. local s = math.sqrt(m00 - m11 - m22 + 1)
  321. local recip = 0.5 / s
  322. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  323. elseif i == 1 then
  324. local s = math.sqrt(m11 - m22 - m00 + 1)
  325. local recip = 0.5 / s
  326. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  327. elseif i == 2 then
  328. local s = math.sqrt(m22 - m00 - m11 + 1)
  329. local recip = 0.5 / s
  330. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  331. end
  332. end
  333. end
  334. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  335. local xs, ys, zs = x + x, y + y, z + z
  336. local wx, wy, wz = w * xs, w * ys, w * zs
  337. local xx = x * xs
  338. local xy = x * ys
  339. local xz = x * zs
  340. local yy = y * ys
  341. local yz = y * zs
  342. local zz = z * zs
  343. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  344. end
  345. function QuaternionSlerp(a, b, t)
  346. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  347. local startInterp, finishInterp
  348. if cosTheta >= 1.0E-4 then
  349. if 1 - cosTheta > 1.0E-4 then
  350. local theta = math.acos(cosTheta)
  351. local invSinTheta = 1 / Sin(theta)
  352. startInterp = Sin((1 - t) * theta) * invSinTheta
  353. finishInterp = Sin(t * theta) * invSinTheta
  354. else
  355. startInterp = 1 - t
  356. finishInterp = t
  357. end
  358. elseif 1 + cosTheta > 1.0E-4 then
  359. local theta = math.acos(-cosTheta)
  360. local invSinTheta = 1 / Sin(theta)
  361. startInterp = Sin((t - 1) * theta) * invSinTheta
  362. finishInterp = Sin(t * theta) * invSinTheta
  363. else
  364. startInterp = t - 1
  365. finishInterp = t
  366. end
  367. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  368. end
  369. function rayCast(Position, Direction, Range, Ignore)
  370. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  371. end
  372. local RbxUtility = LoadLibrary("RbxUtility")
  373. local Create = RbxUtility.Create
  374.  
  375.  
  376. local ArtificialHB = Instance.new("BindableEvent", script)
  377. ArtificialHB.Name = "Heartbeat"
  378.  
  379. script:WaitForChild("Heartbeat")
  380.  
  381. local tf = 0
  382. local allowframeloss = false
  383. local tossremainder = false
  384. local lastframe = tick()
  385. local frame = 1/60
  386. ArtificialHB:Fire()
  387.  
  388. game:GetService("RunService").Heartbeat:connect(function(s, p)
  389. tf = tf + s
  390. if tf >= frame then
  391. if allowframeloss then
  392. script.Heartbeat:Fire()
  393. lastframe = tick()
  394. else
  395. for i = 1, math.floor(tf / frame) do
  396. ArtificialHB:Fire()
  397. end
  398. lastframe = tick()
  399. end
  400. if tossremainder then
  401. tf = 0
  402. else
  403. tf = tf - frame * math.floor(tf / frame)
  404. end
  405. end
  406. end)
  407.  
  408. function swait(num)
  409. if num == 0 or num == nil then
  410. ArtificialHB.Event:wait()
  411. else
  412. for i = 0, num do
  413. ArtificialHB.Event:wait()
  414. end
  415. end
  416. end
  417.  
  418. -------------------------------------------------------
  419. --Start Damage Function--
  420. -------------------------------------------------------
  421. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  422. if hit.Parent == nil then
  423. return
  424. end
  425. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  426. for _, v in pairs(hit.Parent:children()) do
  427. if v:IsA("Humanoid") then
  428. h = v
  429. end
  430. end
  431. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  432.  
  433. hit.Parent:FindFirstChild("Head"):BreakJoints()
  434. end
  435.  
  436. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  437. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  438. if hit.Parent.DebounceHit.Value == true then
  439. return
  440. end
  441. end
  442. if insta == true then
  443. hit.Parent:FindFirstChild("Head"):BreakJoints()
  444. end
  445. local c = Create("ObjectValue"){
  446. Name = "creator",
  447. Value = owner,
  448. Parent = h,
  449. }
  450. game:GetService("Debris"):AddItem(c, .5)
  451. if HitSound ~= nil and HitPitch ~= nil then
  452. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  453. end
  454. local Damage = math.random(minim, maxim)
  455. local blocked = false
  456. local block = hit.Parent:findFirstChild("Block")
  457. if block ~= nil then
  458. if block.className == "IntValue" then
  459. if block.Value > 0 then
  460. blocked = true
  461. block.Value = block.Value - 1
  462. print(block.Value)
  463. end
  464. end
  465. end
  466. if blocked == false then
  467. h.Health = h.Health - Damage
  468. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  469. else
  470. h.Health = h.Health - (Damage / 2)
  471. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  472. end
  473. if Type == "Knockdown" then
  474. local hum = hit.Parent.Humanoid
  475. hum.PlatformStand = true
  476. coroutine.resume(coroutine.create(function(HHumanoid)
  477. swait(1)
  478. HHumanoid.PlatformStand = false
  479. end), hum)
  480. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  481. local bodvol = Create("BodyVelocity"){
  482. velocity = angle * knockback,
  483. P = 5000,
  484. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  485. Parent = hit,
  486. }
  487. local rl = Create("BodyAngularVelocity"){
  488. P = 3000,
  489. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  490. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  491. Parent = hit,
  492. }
  493. game:GetService("Debris"):AddItem(bodvol, .5)
  494. game:GetService("Debris"):AddItem(rl, .5)
  495. elseif Type == "Normal" then
  496. local vp = Create("BodyVelocity"){
  497. P = 500,
  498. maxForce = Vector3.new(math.huge, 0, math.huge),
  499. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  500. }
  501. if knockback > 0 then
  502. vp.Parent = hit.Parent.Torso
  503. end
  504. game:GetService("Debris"):AddItem(vp, .5)
  505. elseif Type == "Up" then
  506. local bodyVelocity = Create("BodyVelocity"){
  507. velocity = Vector3.new(0, 20, 0),
  508. P = 5000,
  509. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  510. Parent = hit,
  511. }
  512. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  513. elseif Type == "DarkUp" then
  514. coroutine.resume(coroutine.create(function()
  515. for i = 0, 1, 0.1 do
  516. swait()
  517. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  518. end
  519. end))
  520. local bodyVelocity = Create("BodyVelocity"){
  521. velocity = Vector3.new(0, 20, 0),
  522. P = 5000,
  523. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  524. Parent = hit,
  525. }
  526. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  527. elseif Type == "Snare" then
  528. local bp = Create("BodyPosition"){
  529. P = 2000,
  530. D = 100,
  531. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  532. position = hit.Parent.Torso.Position,
  533. Parent = hit.Parent.Torso,
  534. }
  535. game:GetService("Debris"):AddItem(bp, 1)
  536. elseif Type == "Freeze" then
  537. local BodPos = Create("BodyPosition"){
  538. P = 50000,
  539. D = 1000,
  540. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  541. position = hit.Parent.Torso.Position,
  542. Parent = hit.Parent.Torso,
  543. }
  544. local BodGy = Create("BodyGyro") {
  545. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  546. P = 20e+003,
  547. Parent = hit.Parent.Torso,
  548. cframe = hit.Parent.Torso.CFrame,
  549. }
  550. hit.Parent.Torso.Anchored = true
  551. coroutine.resume(coroutine.create(function(Part)
  552. swait(1.5)
  553. Part.Anchored = false
  554. end), hit.Parent.Torso)
  555. game:GetService("Debris"):AddItem(BodPos, 3)
  556. game:GetService("Debris"):AddItem(BodGy, 3)
  557. end
  558. local debounce = Create("BoolValue"){
  559. Name = "DebounceHit",
  560. Parent = hit.Parent,
  561. Value = true,
  562. }
  563. game:GetService("Debris"):AddItem(debounce, Delay)
  564. c = Create("ObjectValue"){
  565. Name = "creator",
  566. Value = Player,
  567. Parent = h,
  568. }
  569. game:GetService("Debris"):AddItem(c, .5)
  570. end
  571. end
  572. -------------------------------------------------------
  573. --End Damage Function--
  574. -------------------------------------------------------
  575.  
  576. -------------------------------------------------------
  577. --Start Damage Function Customization--
  578. -------------------------------------------------------
  579. function ShowDamage(Pos, Text, Time, Color)
  580. local Rate = (1 / 30)
  581. local Pos = (Pos or Vector3.new(0, 0, 0))
  582. local Text = (Text or "")
  583. local Time = (Time or 2)
  584. local Color = (Color or Color3.new(1, 0, 1))
  585. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  586. EffectPart.Anchored = true
  587. local BillboardGui = Create("BillboardGui"){
  588. Size = UDim2.new(3, 0, 3, 0),
  589. Adornee = EffectPart,
  590. Parent = EffectPart,
  591. }
  592. local TextLabel = Create("TextLabel"){
  593. BackgroundTransparency = 1,
  594. Size = UDim2.new(1, 0, 1, 0),
  595. Text = Text,
  596. Font = "Bodoni",
  597. TextColor3 = Color,
  598. TextScaled = true,
  599. TextStrokeColor3 = Color3.fromRGB(0,0,0),
  600. Parent = BillboardGui,
  601. }
  602. game.Debris:AddItem(EffectPart, (Time))
  603. EffectPart.Parent = game:GetService("Workspace")
  604. delay(0, function()
  605. local Frames = (Time / Rate)
  606. for Frame = 1, Frames do
  607. wait(Rate)
  608. local Percent = (Frame / Frames)
  609. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  610. TextLabel.TextTransparency = Percent
  611. end
  612. if EffectPart and EffectPart.Parent then
  613. EffectPart:Destroy()
  614. end
  615. end)
  616. end
  617. -------------------------------------------------------
  618. --End Damage Function Customization--
  619. -------------------------------------------------------
  620.  
  621. function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
  622. for _, c in pairs(workspace:children()) do
  623. local hum = c:findFirstChild("Humanoid")
  624. if hum ~= nil then
  625. local head = c:findFirstChild("Head")
  626. if head ~= nil then
  627. local targ = head.Position - Part.Position
  628. local mag = targ.magnitude
  629. if magni >= mag and c.Name ~= plr.Name then
  630. Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=0", 1.2)
  631. end
  632. end
  633. end
  634. end
  635. end
  636.  
  637.  
  638. CFuncs = {
  639. Part = {
  640. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  641. local Part = Create("Part")({
  642. Parent = Parent,
  643. Reflectance = Reflectance,
  644. Transparency = Transparency,
  645. CanCollide = false,
  646. Locked = true,
  647. BrickColor = BrickColor.new(tostring(BColor)),
  648. Name = Name,
  649. Size = Size,
  650. Material = Material
  651. })
  652. RemoveOutlines(Part)
  653. return Part
  654. end
  655. },
  656. Mesh = {
  657. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  658. local Msh = Create(Mesh)({
  659. Parent = Part,
  660. Offset = OffSet,
  661. Scale = Scale
  662. })
  663. if Mesh == "SpecialMesh" then
  664. Msh.MeshType = MeshType
  665. Msh.MeshId = MeshId
  666. end
  667. return Msh
  668. end
  669. },
  670. Mesh = {
  671. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  672. local Msh = Create(Mesh)({
  673. Parent = Part,
  674. Offset = OffSet,
  675. Scale = Scale
  676. })
  677. if Mesh == "SpecialMesh" then
  678. Msh.MeshType = MeshType
  679. Msh.MeshId = MeshId
  680. end
  681. return Msh
  682. end
  683. },
  684. Weld = {
  685. Create = function(Parent, Part0, Part1, C0, C1)
  686. local Weld = Create("Weld")({
  687. Parent = Parent,
  688. Part0 = Part0,
  689. Part1 = Part1,
  690. C0 = C0,
  691. C1 = C1
  692. })
  693. return Weld
  694. end
  695. },
  696. Sound = {
  697. Create = function(id, par, vol, pit)
  698. coroutine.resume(coroutine.create(function()
  699. local S = Create("Sound")({
  700. Volume = vol,
  701. Pitch = pit or 1,
  702. SoundId = id,
  703. Parent = par or workspace
  704. })
  705. wait()
  706. S:play()
  707. game:GetService("Debris"):AddItem(S, 6)
  708. end))
  709. end
  710. },
  711. ParticleEmitter = {
  712. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  713. local fp = Create("ParticleEmitter")({
  714. Parent = Parent,
  715. Color = ColorSequence.new(Color1, Color2),
  716. LightEmission = LightEmission,
  717. Size = Size,
  718. Texture = Texture,
  719. Transparency = Transparency,
  720. ZOffset = ZOffset,
  721. Acceleration = Accel,
  722. Drag = Drag,
  723. LockedToPart = LockedToPart,
  724. VelocityInheritance = VelocityInheritance,
  725. EmissionDirection = EmissionDirection,
  726. Enabled = Enabled,
  727. Lifetime = LifeTime,
  728. Rate = Rate,
  729. Rotation = Rotation,
  730. RotSpeed = RotSpeed,
  731. Speed = Speed,
  732. VelocitySpread = VelocitySpread
  733. })
  734. return fp
  735. end
  736. }
  737. }
  738. function RemoveOutlines(part)
  739. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  740. end
  741. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  742. local Part = Create("Part")({
  743. formFactor = FormFactor,
  744. Parent = Parent,
  745. Reflectance = Reflectance,
  746. Transparency = Transparency,
  747. CanCollide = false,
  748. Locked = true,
  749. BrickColor = BrickColor.new(tostring(BColor)),
  750. Name = Name,
  751. Size = Size,
  752. Material = Material
  753. })
  754. RemoveOutlines(Part)
  755. return Part
  756. end
  757. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  758. local Msh = Create(Mesh)({
  759. Parent = Part,
  760. Offset = OffSet,
  761. Scale = Scale
  762. })
  763. if Mesh == "SpecialMesh" then
  764. Msh.MeshType = MeshType
  765. Msh.MeshId = MeshId
  766. end
  767. return Msh
  768. end
  769. function CreateWeld(Parent, Part0, Part1, C0, C1)
  770. local Weld = Create("Weld")({
  771. Parent = Parent,
  772. Part0 = Part0,
  773. Part1 = Part1,
  774. C0 = C0,
  775. C1 = C1
  776. })
  777. return Weld
  778. end
  779.  
  780.  
  781. -------------------------------------------------------
  782. --Start Effect Function--
  783. -------------------------------------------------------
  784. EffectModel = Instance.new("Model", char)
  785. Effects = {
  786. Block = {
  787. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  788. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  789. prt.Anchored = true
  790. prt.CFrame = cframe
  791. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  792. game:GetService("Debris"):AddItem(prt, 10)
  793. if Type == 1 or Type == nil then
  794. table.insert(Effects, {
  795. prt,
  796. "Block1",
  797. delay,
  798. x3,
  799. y3,
  800. z3,
  801. msh
  802. })
  803. elseif Type == 2 then
  804. table.insert(Effects, {
  805. prt,
  806. "Block2",
  807. delay,
  808. x3,
  809. y3,
  810. z3,
  811. msh
  812. })
  813. else
  814. table.insert(Effects, {
  815. prt,
  816. "Block3",
  817. delay,
  818. x3,
  819. y3,
  820. z3,
  821. msh
  822. })
  823. end
  824. end
  825. },
  826. Sphere = {
  827. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  828. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  829. prt.Anchored = true
  830. prt.CFrame = cframe
  831. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  832. game:GetService("Debris"):AddItem(prt, 10)
  833. table.insert(Effects, {
  834. prt,
  835. "Cylinder",
  836. delay,
  837. x3,
  838. y3,
  839. z3,
  840. msh
  841. })
  842. end
  843. },
  844. Cylinder = {
  845. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  846. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  847. prt.Anchored = true
  848. prt.CFrame = cframe
  849. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  850. game:GetService("Debris"):AddItem(prt, 10)
  851. table.insert(Effects, {
  852. prt,
  853. "Cylinder",
  854. delay,
  855. x3,
  856. y3,
  857. z3,
  858. msh
  859. })
  860. end
  861. },
  862. Wave = {
  863. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  864. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  865. prt.Anchored = true
  866. prt.CFrame = cframe
  867. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  868. game:GetService("Debris"):AddItem(prt, 10)
  869. table.insert(Effects, {
  870. prt,
  871. "Cylinder",
  872. delay,
  873. x3 / 60,
  874. y3 / 60,
  875. z3 / 60,
  876. msh
  877. })
  878. end
  879. },
  880. Ring = {
  881. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  882. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  883. prt.Anchored = true
  884. prt.CFrame = cframe
  885. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  886. game:GetService("Debris"):AddItem(prt, 10)
  887. table.insert(Effects, {
  888. prt,
  889. "Cylinder",
  890. delay,
  891. x3,
  892. y3,
  893. z3,
  894. msh
  895. })
  896. end
  897. },
  898. Break = {
  899. Create = function(brickcolor, cframe, x1, y1, z1)
  900. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  901. prt.Anchored = true
  902. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  903. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  904. local num = math.random(10, 50) / 1000
  905. game:GetService("Debris"):AddItem(prt, 10)
  906. table.insert(Effects, {
  907. prt,
  908. "Shatter",
  909. num,
  910. prt.CFrame,
  911. math.random() - math.random(),
  912. 0,
  913. math.random(50, 100) / 100
  914. })
  915. end
  916. },
  917. Spiral = {
  918. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  919. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  920. prt.Anchored = true
  921. prt.CFrame = cframe
  922. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://1051557", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  923. game:GetService("Debris"):AddItem(prt, 10)
  924. table.insert(Effects, {
  925. prt,
  926. "Cylinder",
  927. delay,
  928. x3,
  929. y3,
  930. z3,
  931. msh
  932. })
  933. end
  934. },
  935. Push = {
  936. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  937. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  938. prt.Anchored = true
  939. prt.CFrame = cframe
  940. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  941. game:GetService("Debris"):AddItem(prt, 10)
  942. table.insert(Effects, {
  943. prt,
  944. "Cylinder",
  945. delay,
  946. x3,
  947. y3,
  948. z3,
  949. msh
  950. })
  951. end
  952. }
  953. }
  954. function part(formfactor ,parent, reflectance, transparency, brickcolor, name, size)
  955. local fp = IT("Part")
  956. fp.formFactor = formfactor
  957. fp.Parent = parent
  958. fp.Reflectance = reflectance
  959. fp.Transparency = transparency
  960. fp.CanCollide = false
  961. fp.Locked = true
  962. fp.BrickColor = brickcolor
  963. fp.Name = name
  964. fp.Size = size
  965. fp.Position = tors.Position
  966. RemoveOutlines(fp)
  967. fp.Material = "SmoothPlastic"
  968. fp:BreakJoints()
  969. return fp
  970. end
  971.  
  972. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  973. local mesh = IT(Mesh)
  974. mesh.Parent = part
  975. if Mesh == "SpecialMesh" then
  976. mesh.MeshType = meshtype
  977. if meshid ~= "nil" then
  978. mesh.MeshId = "http://www.roblox.com/asset/?id="..meshid
  979. end
  980. end
  981. mesh.Offset = offset
  982. mesh.Scale = scale
  983. return mesh
  984. end
  985.  
  986. function Magic(bonuspeed, type, pos, scale, value, color, MType)
  987. local type = type
  988. local rng = Instance.new("Part", char)
  989. rng.Anchored = true
  990. rng.BrickColor = color
  991. rng.CanCollide = false
  992. rng.FormFactor = 3
  993. rng.Name = "Ring"
  994. rng.Material = "Neon"
  995. rng.Size = Vector3.new(1, 1, 1)
  996. rng.Transparency = 0
  997. rng.TopSurface = 0
  998. rng.BottomSurface = 0
  999. rng.CFrame = pos
  1000. local rngm = Instance.new("SpecialMesh", rng)
  1001. rngm.MeshType = MType
  1002. rngm.Scale = scale
  1003. local scaler2 = 1
  1004. if type == "Add" then
  1005. scaler2 = 1 * value
  1006. elseif type == "Divide" then
  1007. scaler2 = 1 / value
  1008. end
  1009. coroutine.resume(coroutine.create(function()
  1010. for i = 0, 10 / bonuspeed, 0.1 do
  1011. swait()
  1012. if type == "Add" then
  1013. scaler2 = scaler2 - 0.01 * value / bonuspeed
  1014. elseif type == "Divide" then
  1015. scaler2 = scaler2 - 0.01 / value * bonuspeed
  1016. end
  1017. rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  1018. rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, scaler2 * bonuspeed)
  1019. end
  1020. rng:Destroy()
  1021. end))
  1022. end
  1023.  
  1024. function Eviscerate(dude)
  1025. if dude.Name ~= char then
  1026. local bgf = IT("BodyGyro", dude.Head)
  1027. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  1028. local val = IT("BoolValue", dude)
  1029. val.Name = "IsHit"
  1030. local ds = coroutine.wrap(function()
  1031. dude:WaitForChild("Head"):BreakJoints()
  1032. wait(0.5)
  1033. target = nil
  1034. coroutine.resume(coroutine.create(function()
  1035. for i, v in pairs(dude:GetChildren()) do
  1036. if v:IsA("Accessory") then
  1037. v:Destroy()
  1038. end
  1039. if v:IsA("Humanoid") then
  1040. v:Destroy()
  1041. end
  1042. if v:IsA("CharacterMesh") then
  1043. v:Destroy()
  1044. end
  1045. if v:IsA("Model") then
  1046. v:Destroy()
  1047. end
  1048. if v:IsA("Part") or v:IsA("MeshPart") then
  1049. for x, o in pairs(v:GetChildren()) do
  1050. if o:IsA("Decal") then
  1051. o:Destroy()
  1052. end
  1053. end
  1054. coroutine.resume(coroutine.create(function()
  1055. v.Material = "Neon"
  1056. v.CanCollide = false
  1057. local PartEmmit1 = IT("ParticleEmitter", v)
  1058. PartEmmit1.LightEmission = 1
  1059. PartEmmit1.Texture = "rbxassetid://284205403"
  1060. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  1061. PartEmmit1.Rate = 150
  1062. PartEmmit1.Lifetime = NumberRange.new(1)
  1063. PartEmmit1.Size = NumberSequence.new({
  1064. NumberSequenceKeypoint.new(0, 0.75, 0),
  1065. NumberSequenceKeypoint.new(1, 0, 0)
  1066. })
  1067. PartEmmit1.Transparency = NumberSequence.new({
  1068. NumberSequenceKeypoint.new(0, 0, 0),
  1069. NumberSequenceKeypoint.new(1, 1, 0)
  1070. })
  1071. PartEmmit1.Speed = NumberRange.new(0, 0)
  1072. PartEmmit1.VelocitySpread = 30000
  1073. PartEmmit1.Rotation = NumberRange.new(-500, 500)
  1074. PartEmmit1.RotSpeed = NumberRange.new(-500, 500)
  1075. local BodPoss = IT("BodyPosition", v)
  1076. BodPoss.P = 3000
  1077. BodPoss.D = 1000
  1078. BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  1079. BodPoss.position = v.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  1080. v.Color = maincolor.Color
  1081. coroutine.resume(coroutine.create(function()
  1082. for i = 0, 49 do
  1083. swait(1)
  1084. v.Transparency = v.Transparency + 0.08
  1085. end
  1086. wait(0.5)
  1087. PartEmmit1.Enabled = false
  1088. wait(3)
  1089. v:Destroy()
  1090. dude:Destroy()
  1091. end))
  1092. end))
  1093. end
  1094. end
  1095. end))
  1096. end)
  1097. ds()
  1098. end
  1099. end
  1100.  
  1101. function FindNearestHead(Position, Distance, SinglePlayer)
  1102. if SinglePlayer then
  1103. return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
  1104. end
  1105. local List = {}
  1106. for i, v in pairs(workspace:GetChildren()) do
  1107. if v:IsA("Model") and v:findFirstChild("Head") and v ~= char and Distance >= (v.Head.Position - Position).magnitude then
  1108. table.insert(List, v)
  1109. end
  1110. end
  1111. return List
  1112. end
  1113.  
  1114. function Aura(bonuspeed, FastSpeed, type, pos, x1, y1, z1, value, color, outerpos, MType)
  1115. local type = type
  1116. local rng = Instance.new("Part", char)
  1117. rng.Anchored = true
  1118. rng.BrickColor = color
  1119. rng.CanCollide = false
  1120. rng.FormFactor = 3
  1121. rng.Name = "Ring"
  1122. rng.Material = "Neon"
  1123. rng.Size = Vector3.new(1, 1, 1)
  1124. rng.Transparency = 0
  1125. rng.TopSurface = 0
  1126. rng.BottomSurface = 0
  1127. rng.CFrame = pos
  1128. rng.CFrame = rng.CFrame + rng.CFrame.lookVector * outerpos
  1129. local rngm = Instance.new("SpecialMesh", rng)
  1130. rngm.MeshType = MType
  1131. rngm.Scale = Vector3.new(x1, y1, z1)
  1132. local scaler2 = 1
  1133. local speeder = FastSpeed
  1134. if type == "Add" then
  1135. scaler2 = 1 * value
  1136. elseif type == "Divide" then
  1137. scaler2 = 1 / value
  1138. end
  1139. coroutine.resume(coroutine.create(function()
  1140. for i = 0, 10 / bonuspeed, 0.1 do
  1141. swait()
  1142. if type == "Add" then
  1143. scaler2 = scaler2 - 0.01 * value / bonuspeed
  1144. elseif type == "Divide" then
  1145. scaler2 = scaler2 - 0.01 / value * bonuspeed
  1146. end
  1147. speeder = speeder - 0.01 * FastSpeed * bonuspeed
  1148. rng.CFrame = rng.CFrame + rng.CFrame.lookVector * speeder * bonuspeed
  1149. rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  1150. rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, 0)
  1151. end
  1152. rng:Destroy()
  1153. end))
  1154. end
  1155.  
  1156. function SoulSteal(dude)
  1157. if dude.Name ~= char then
  1158. local bgf = IT("BodyGyro", dude.Head)
  1159. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  1160. local val = IT("BoolValue", dude)
  1161. val.Name = "IsHit"
  1162. local torso = (dude:FindFirstChild'Head' or dude:FindFirstChild'Torso' or dude:FindFirstChild'UpperTorso' or dude:FindFirstChild'LowerTorso' or dude:FindFirstChild'HumanoidRootPart')
  1163. local soulst = coroutine.wrap(function()
  1164. local soul = Instance.new("Part",dude)
  1165. soul.Size = Vector3.new(1,1,1)
  1166. soul.CanCollide = false
  1167. soul.Anchored = false
  1168. soul.Position = torso.Position
  1169. soul.Transparency = 1
  1170. local PartEmmit1 = IT("ParticleEmitter", soul)
  1171. PartEmmit1.LightEmission = 1
  1172. PartEmmit1.Texture = "rbxassetid://569507414"
  1173. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  1174. PartEmmit1.Rate = 250
  1175. PartEmmit1.Lifetime = NumberRange.new(1.6)
  1176. PartEmmit1.Size = NumberSequence.new({
  1177. NumberSequenceKeypoint.new(0, 1, 0),
  1178. NumberSequenceKeypoint.new(1, 0, 0)
  1179. })
  1180. PartEmmit1.Transparency = NumberSequence.new({
  1181. NumberSequenceKeypoint.new(0, 0, 0),
  1182. NumberSequenceKeypoint.new(1, 1, 0)
  1183. })
  1184. PartEmmit1.Speed = NumberRange.new(0, 0)
  1185. PartEmmit1.VelocitySpread = 30000
  1186. PartEmmit1.Rotation = NumberRange.new(-360, 360)
  1187. PartEmmit1.RotSpeed = NumberRange.new(-360, 360)
  1188. local BodPoss = IT("BodyPosition", soul)
  1189. BodPoss.P = 3000
  1190. BodPoss.D = 1000
  1191. BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  1192. BodPoss.position = torso.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  1193. wait(1.6)
  1194. soul.Touched:connect(function(hit)
  1195. if hit.Parent == char then
  1196. soul:Destroy()
  1197. end
  1198. end)
  1199. wait(1.2)
  1200. while soul do
  1201. swait()
  1202. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  1203. BodPoss.Position = tors.Position
  1204. end
  1205. end)
  1206. soulst()
  1207. end
  1208. end
  1209. function FaceMouse()
  1210. local Cam = workspace.CurrentCamera
  1211. return {
  1212. CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)),
  1213. Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z)
  1214. }
  1215. end
  1216. -------------------------------------------------------
  1217. --End Effect Function--
  1218. -------------------------------------------------------
  1219. function Cso(ID, PARENT, VOLUME, PITCH)
  1220. local NSound = nil
  1221. coroutine.resume(coroutine.create(function()
  1222. NSound = IT("Sound", PARENT)
  1223. NSound.Volume = VOLUME
  1224. NSound.Pitch = PITCH
  1225. NSound.SoundId = "http://www.roblox.com/asset/?id="..ID
  1226. swait()
  1227. NSound:play()
  1228. game:GetService("Debris"):AddItem(NSound, 10)
  1229. end))
  1230. return NSound
  1231. end
  1232. -------------------------------------------------------
  1233. --End Important Functions--
  1234. -------------------------------------------------------
  1235.  
  1236.  
  1237. -------------------------------------------------------
  1238. --Start Music Option--
  1239. -------------------------------------------------------
  1240. local Music = Instance.new("Sound",tors)
  1241. Music.Volume = 0.5
  1242. Music.SoundId = "rbxassetid://631670511"
  1243. Music.Looped = true
  1244. Music.Pitch = 0.95 --Pitcher
  1245. Music:Play()
  1246. -------------------------------------------------------
  1247. --End Music Option--
  1248. -------------------------------------------------------
  1249.  
  1250.  
  1251. -------------------------------------------------------
  1252. --Start Attacks N Stuff--
  1253. -------------------------------------------------------
  1254. local sine=0
  1255. function HitboxFunction(Pose,Trans, lifetime, siz1, siz2, siz3, Radie, Min, Max, kb, atype)
  1256. local Hitboxpart = Instance.new("Part", EffectModel)
  1257. Hitboxpart.BrickColor = BrickColor.new("New Yeller")
  1258. RemoveOutlines(Hitboxpart)
  1259. Hitboxpart.Size = Vector3.new(siz1, siz2, siz3)
  1260. Hitboxpart.CanCollide = false
  1261. Hitboxpart.Transparency = Trans
  1262. Hitboxpart.Anchored = true
  1263. Hitboxpart.CFrame = Pose
  1264. game:GetService("Debris"):AddItem(Hitboxpart, lifetime)
  1265. MagniDamage(Hitboxpart, Radie, Min, Max, kb, atype)
  1266. end
  1267.  
  1268. function Hai()
  1269. attack = true
  1270. hum.WalkSpeed = 0
  1271. Cso("599688682",tors,2.5,1)
  1272. for i = 0,10,0.1 do
  1273. swait()
  1274. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -.7 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(0)), 0.15)
  1275. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.8 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3)
  1276. RH.C0 = clerp(RH.C0, CF(1, -1.5 - 0.1 * Cos(sine / 20), -1) * RHCF * angles(Rad(-2.5), Rad(0), Rad(-90)), 0.15)
  1277. LH.C0 = clerp(LH.C0, CF(-1, -1.5 - 0.1 * Cos(sine / 20), -1) * LHCF * angles(Rad(-2.5), Rad(0), Rad(90)), 0.15)
  1278. RW.C0 = clerp(RW.C0, CF(1.1, 0.7 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(-20), Rad(170 + 20 * Sin(sine / 5))), 0.1)
  1279. LW.C0 = clerp(LW.C0, CF(-1.1, 0.7 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(20), Rad(-170 - 20 * Sin(sine / 5))), 0.1)
  1280. end
  1281. attack = false
  1282. Sprinting = false
  1283. hum.WalkSpeed = 8
  1284. end
  1285.  
  1286. function aahh()
  1287. attack = true
  1288. hum.WalkSpeed = 0
  1289. local air = Cso("291753081",tors,0.5,1)
  1290. faic.Texture = "http://www.roblox.com/asset/?id=280866530"
  1291. for i = 0,20,0.1 do
  1292. swait()
  1293. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(0)), 0.15)
  1294. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.8 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3)
  1295. RH.C0 = clerp(RH.C0, CF(1.2, -0.5 - 0.1 * Cos(sine / 20), -.2) * RHCF * angles(Rad(-2.5), Rad(-20), Rad(-10)), 0.15)
  1296. LH.C0 = clerp(LH.C0, CF(-1.2, -0.5 - 0.1 * Cos(sine / 20), -.2) * LHCF * angles(Rad(-2.5), Rad(20), Rad(10)), 0.15)
  1297. RW.C0 = clerp(RW.C0, CF(1.1, 0.7 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(-20), Rad(170)), 0.1)
  1298. LW.C0 = clerp(LW.C0, CF(-1.1, 0.7 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(20), Rad(-170)), 0.1)
  1299. for i, v in pairs(FindNearestHead(tors.CFrame.p, 15)) do
  1300. if v:FindFirstChild("Head") then
  1301. local BV = Instance.new("BodyVelocity")
  1302. BV.Velocity = tors.Position
  1303. BV.Parent = v.Torso
  1304. for i, v in pairs(FindNearestHead(tors.CFrame.p, 4)) do
  1305. if v:FindFirstChild("Head") then
  1306. v:BreakJoints()
  1307. v:Destroy()
  1308. end
  1309. BV:Destroy()
  1310. end
  1311. end
  1312. end
  1313. end
  1314. Sprinting = false
  1315. attack = false
  1316. air:Destroy()
  1317. hum.WalkSpeed = 8
  1318. faic.Texture = "http://www.roblox.com/asset/?id=32139835"
  1319. end
  1320. -------------------------------------------------------
  1321. --End Attacks N Stuff--
  1322. -------------------------------------------------------
  1323. Sprinting = false
  1324. mouse.KeyDown:connect(function(key)
  1325. if key == 'c' and attack == false and Sprinting == false then
  1326. Sprinting = true
  1327. hum.WalkSpeed = 35
  1328. elseif key == 'c' and attack == false and Sprinting == true then
  1329. Sprinting = false
  1330. hum.WalkSpeed = 8
  1331. end
  1332. end)
  1333.  
  1334. mouse.KeyDown:connect(function(key)
  1335. if key == 't' and attack == false then
  1336. Hai()
  1337. elseif key == 'r' and attack == false then
  1338. aahh()
  1339. end
  1340. end)
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348. -------------------------------------------------------
  1349. --Start Animations--
  1350. -------------------------------------------------------
  1351. local equipped = false
  1352. local idle = 0
  1353. local change = 1
  1354. local val = 0
  1355. local toim = 0
  1356. local idleanim = 0.4
  1357. hum.WalkSpeed = 8
  1358. hum.Animator.Parent = nil
  1359. while true do
  1360. swait()
  1361. if char:FindFirstChildOfClass("Accessory") then
  1362. char:FindFirstChildOfClass("Accessory"):Destroy()
  1363. end
  1364. sine = sine + change
  1365. local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
  1366. local velderp = root.Velocity.y
  1367. hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4, char)
  1368. if equipped == true or equipped == false then
  1369. if attack == false then
  1370. idle = idle + 1
  1371. else
  1372. idle = 0
  1373. end
  1374. local exactVel = CFrame.new(root.CFrame:vectorToObjectSpace(root.Velocity))-- for footplanting
  1375. --you g00b my leg animations are complicated :joy:
  1376.  
  1377. if 1 < root.Velocity.y and hitfloor == nil then
  1378. Anim = "Jump"
  1379. if attack == false then
  1380. rootj.C0 = clerp(rootj.C0 * CF(0, 0, -0.5), RootCF * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,0),0.3)
  1381. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1382. RW.C0 = clerp(RW.C0, CF(1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(15)),0.3)
  1383. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(-15)),0.3)
  1384. LH.C0=clerp(LH.C0, CF(-1,-0.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15)
  1385. RH.C0=clerp(RH.C0, CF(1,-1-0.1 * Cos(sine / 20), -.3) * angles(Rad(0), Rad(90), Rad(0)), .3)
  1386. end
  1387. elseif -1 > root.Velocity.y and hitfloor == nil then
  1388. Anim = "Fall"
  1389. if attack == false then
  1390. rootj.C0 = clerp(rootj.C0 * CF(0, 0, -0.5), RootCF * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,0),0.3)
  1391. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1392. RW.C0 = clerp(RW.C0, CF(1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(30)),0.3)
  1393. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(-30)),0.3)
  1394. LH.C0 = clerp(LH.C0, CF(-1,-0.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15)
  1395. RH.C0 = clerp(RH.C0, CF(1,-1-0.1 * Cos(sine / 20), -.3) * angles(Rad(0), Rad(90), Rad(0)), .3)
  1396. end
  1397. elseif torvel < 1 and hitfloor ~= nil then
  1398. Anim = "Idle"
  1399. change = .5
  1400. if attack == false then
  1401. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -1.2 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(0)), 0.15)
  1402. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.8 * Sin(sine / 30)), Rad(0), Rad(0)), 0.3)
  1403. RH.C0 = clerp(RH.C0, CF(1, -0.5 - 0.1 * Cos(sine / 20), -.2) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1404. LH.C0 = clerp(LH.C0, CF(-1, -0.5 - 0.1 * Cos(sine / 20), -.2) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1405. RW.C0 = clerp(RW.C0, CF(1.3, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(-.6), Rad(20 + 4.5 * Sin(sine / 20))), 0.1)
  1406. LW.C0 = clerp(LW.C0, CF(-1.3, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(-.6), Rad(-20 - 4.5 * Sin(sine / 20))), 0.1)
  1407. end
  1408. elseif tors.Velocity.magnitude < 50 and hitfloor ~= nil then
  1409. Anim = "Walk"
  1410. if attack == false then
  1411. change = .9
  1412. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -1 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(5 - 2.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(8 * Cos(sine / 7))), 0.15)
  1413. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.5 * Sin(sine / 7)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3)
  1414. RH.C0 = clerp(RH.C0, CF(1, -0.7 - 0.5 * Cos(sine / 7) / 2, -.2 + 0.6 * Cos(sine / 7) / 2) * angles(Rad(-15 - 2 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 3 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  1415. LH.C0 = clerp(LH.C0, CF(-1, -0.7 + 0.5 * Cos(sine / 7) / 2, -.2 + -0.6 * Cos(sine / 7) / 2) * angles(Rad(-15 + 2 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 3 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  1416. RW.C0 = clerp(RW.C0, CF(1.3, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(37) * Cos(sine / 7) , Rad(0), Rad(20)), 0.1)
  1417. LW.C0 = clerp(LW.C0, CF(-1.3, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(-37) * Cos(sine / 7) , Rad(0) , Rad(-20)), 0.1)
  1418. if Sprinting == true then
  1419. change = 1.2
  1420. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -1 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(20 - 2.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(8 * Cos(sine / 7))), 0.15)
  1421. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.5 * Sin(sine / 7)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3)
  1422. RH.C0 = clerp(RH.C0, CF(1, -0.7 - 0.5 * Cos(sine / 7) / 2, -.2 + -1 * Cos(sine / 7) / 2) * angles(Rad(-15 - -75 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 3 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  1423. LH.C0 = clerp(LH.C0, CF(-1, -0.7 + 0.5 * Cos(sine / 7) / 2, -.2 + 1 * Cos(sine / 7) / 2) * angles(Rad(-15 + -75 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 3 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3)
  1424. RW.C0 = clerp(RW.C0, CF(1.3, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(-150), Rad(0), Rad(30)), 0.1)
  1425. LW.C0 = clerp(LW.C0, CF(-1.3, 0.5 + 0.05 * Sin(sine / 7), 0) * angles(Rad(-150), Rad(0), Rad(-30)), 0.1)
  1426. end
  1427. end
  1428. end
  1429. end
  1430. if 0 < #Effects then
  1431. for e = 1, #Effects do
  1432. if Effects[e] ~= nil then
  1433. local Thing = Effects[e]
  1434. if Thing ~= nil then
  1435. local Part = Thing[1]
  1436. local Mode = Thing[2]
  1437. local Delay = Thing[3]
  1438. local IncX = Thing[4]
  1439. local IncY = Thing[5]
  1440. local IncZ = Thing[6]
  1441. if 1 >= Thing[1].Transparency then
  1442. if Thing[2] == "Block1" then
  1443. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1444. local Mesh = Thing[1].Mesh
  1445. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1446. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1447. elseif Thing[2] == "Block2" then
  1448. Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
  1449. local Mesh = Thing[7]
  1450. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1451. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1452. elseif Thing[2] == "Block3" then
  1453. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
  1454. local Mesh = Thing[7]
  1455. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1456. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1457. elseif Thing[2] == "Cylinder" then
  1458. local Mesh = Thing[1].Mesh
  1459. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1460. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1461. elseif Thing[2] == "Blood" then
  1462. local Mesh = Thing[7]
  1463. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1464. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1465. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1466. elseif Thing[2] == "Elec" then
  1467. local Mesh = Thing[1].Mesh
  1468. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1469. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1470. elseif Thing[2] == "Disappear" then
  1471. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1472. elseif Thing[2] == "Shatter" then
  1473. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1474. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1475. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1476. Thing[6] = Thing[6] + Thing[5]
  1477. end
  1478. else
  1479. Part.Parent = nil
  1480. table.remove(Effects, e)
  1481. end
  1482. end
  1483. end
  1484. end
  1485. end
  1486. end
  1487. -------------------------------------------------------
  1488. --End Animations And Script--
  1489. -------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement