Advertisement
DaOMEGAa32

fe steamed hams

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