Advertisement
Guest User

Untitled

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