Advertisement
saba1517

Untitled

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