Advertisement
DarkScriptZEditors

STEAM HAMS

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