Advertisement
idkwhatiam

tauntmelon

Jun 8th, 2019
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.86 KB | None | 0 0
  1. print("tauntmelon by youngmacka123 loaded.")
  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. warn("tauntmelon by youngmacka123")
  7. local rp = RealPlayer
  8. script.Parent = rp.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent then
  34. for _,f in pairs(t.Functions) do
  35. f(...)
  36. end
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=rp then return end
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. if not io.isMouse then
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. for _,t in pairs(CAS.Actions) do
  52. for _,k in pairs(t.Keys) do
  53. if k==io.KeyCode then
  54. t.Function(t.Name,io.UserInputState,io)
  55. end
  56. end
  57. end
  58. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  59. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  60. end
  61. end)
  62. Event.Parent = NLS([==[
  63. local Player = game:GetService("Players").LocalPlayer
  64. local Event = script:WaitForChild("UserInput_Event")
  65.  
  66. local Mouse = Player:GetMouse()
  67. local UIS = game:GetService("UserInputService")
  68. local input = function(io,a)
  69. if a then return end
  70. --Since InputObject is a client-side instance, we create and pass table instead
  71. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  72. end
  73. UIS.InputBegan:Connect(input)
  74. UIS.InputEnded:Connect(input)
  75.  
  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 return s[k] end
  95. end,
  96. __newindex = function(self,k,v)
  97. local s = rawget(self,"_RealService")
  98. if s then s[k]=v end
  99. end,
  100. __call = function(self,...)
  101. local s = rawget(self,"_RealService")
  102. if s then return s(...) end
  103. end
  104. }
  105. local function FakeService(t,RealService)
  106. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  107. return setmetatable(t,fsmt)
  108. end
  109.  
  110. --Fake game object
  111. local g = {
  112. GetService = function(self,s)
  113. return self[s]
  114. end,
  115. Players = FakeService({
  116. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  117. },"Players"),
  118. UserInputService = FakeService(UIS,"UserInputService"),
  119. ContextActionService = FakeService(CAS,"ContextActionService"),
  120. }
  121. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  122. g.service = g.GetService
  123.  
  124. g.RunService = FakeService({
  125. RenderStepped = _rg:GetService("RunService").Heartbeat,
  126. BindToRenderStep = function(self,name,_,fun)
  127.  
  128. end,
  129. UnbindFromRenderStep = function(self,name)
  130. self._btrs[name]:Disconnect()
  131. end,
  132. },"RunService")
  133.  
  134. setmetatable(g,{
  135. __index=function(self,s)
  136. return _rg:GetService(s) or typeof(_rg[s])=="function"
  137. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  138. end,
  139. __newindex = fsmt.__newindex,
  140. __call = fsmt.__call
  141. })
  142. --Changing owner to fake player object to support owner:GetMouse()
  143. game,owner = g,g.Players.LocalPlayer
  144. end
  145.  
  146. local cansilence = true
  147.  
  148. function SHUTUPXDD()
  149. if cansilence then
  150. cansilence = false
  151. local function search(instance)
  152. for i,v in pairs(instance:GetChildren()) do
  153. search(v)
  154. if v.ClassName == "Sound" then
  155. if v.Parent ~= game.Players.LocalPlayer.Character then
  156. v.Volume = 0
  157. end
  158. end
  159. end
  160. end
  161. search(workspace)
  162. wait(3)
  163. cansilence = false
  164. end
  165. end
  166.  
  167. game:GetService("RunService").RenderStepped:connect(SHUTUPXDD)
  168.  
  169. Player_Size = 1 --Size of the player.
  170.  
  171. wait()
  172. local Player = owner
  173. local Character = Player.Character
  174. local plr = owner
  175. local Humanoid = Character.Humanoid
  176. local char = plr.Character
  177. local hum = char.Humanoid
  178. local ra = char["Right Arm"]
  179. local la= char["Left Arm"]
  180. local rl= char["Right Leg"]
  181. local ll = char["Left Leg"]
  182. local hed = char.Head
  183. local root = char.HumanoidRootPart
  184. local rootj = root.RootJoint
  185. local tors = char.Torso
  186. local LeftArm = Character["Left Arm"]
  187. local RightArm = Character["Right Arm"]
  188. local LeftLeg = Character["Left Leg"]
  189. local RightLeg = Character["Right Leg"]
  190. local Head = Character.Head
  191. local Torso = Character.Torso
  192. local mouse = plr:GetMouse()
  193. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  194. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  195. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  196. local cam = game.Workspace.CurrentCamera
  197. trazx = Instance.new("ParticleEmitter")
  198. c = game.Players.LocalPlayer.Character
  199. local sine=0
  200.  
  201. hum.MaxHealth = "Inf"
  202. hum.Health = "Inf"
  203.  
  204. local forcefield = Instance.new("ForceField",char)
  205. forcefield.Name = "feaqurmam"
  206. forcefield.Visible = false
  207.  
  208. Head.BrickColor = BrickColor.new("Institutional white")
  209. RightArm.BrickColor = BrickColor.new("Institutional white")
  210. LeftArm.BrickColor = BrickColor.new("Institutional white")
  211. Torso.BrickColor = BrickColor.new("Black")
  212. RightLeg.BrickColor = BrickColor.new("Grey")
  213. LeftLeg.BrickColor = BrickColor.new("Grey")
  214.  
  215. for i,v in pairs(Character:children()) do
  216. if v:IsA("Hat") then
  217. v:Destroy()
  218. end
  219. end
  220. for i,v in pairs(Character:children()) do
  221. if v:IsA("Accessory") then
  222. v:Destroy()
  223. end
  224. end
  225. for i,v in pairs(Character:children()) do
  226. if v:IsA("Hair") then
  227. v:Destroy()
  228. end
  229. end
  230. for i,v in pairs(Character:children()) do
  231. if v:IsA("Shirt") then
  232. v:Destroy()
  233. end
  234. end
  235. for i,v in pairs(Character:children()) do
  236. if v:IsA("Pants") then
  237. v:Destroy()
  238. end
  239. end
  240. for i,v in pairs(Character:children()) do
  241. if v:IsA("Graphic Shirt") then
  242. v:Destroy()
  243. end
  244. end
  245. for i,v in pairs(Character:children()) do
  246. if v:IsA("GraphicShirt") then
  247. v:Destroy()
  248. end
  249. end
  250.  
  251. for _,v in pairs(Character:children()) do
  252. if v:IsA("Shirt") then
  253. v.ShirtTemplate = "rbxassetid://0"
  254. elseif v:IsA("Pants") then
  255. v.PantsTemplate = "rbxassetid://0"
  256. elseif v:IsA("ShirtGraphic") then
  257. v:Remove()
  258. wait(.1)
  259. Torso.roblox:Remove()
  260. elseif v:IsA("Accessory") then
  261. v:Remove()
  262. end
  263. end
  264.  
  265. -------------------------------------------------------
  266. CF = CFrame.new
  267. angles = CFrame.Angles
  268. attack = false
  269. timetofly = true
  270. Euler = CFrame.fromEulerAnglesXYZ
  271. Rad = math.rad
  272. IT = Instance.new
  273. BrickC = BrickColor.new
  274. Cos = math.cos
  275. Acos = math.acos
  276. Sin = math.sin
  277. Asin = math.asin
  278. Abs = math.abs
  279. Mrandom = math.random
  280. Floor = math.floor
  281. random = math.random
  282. radian = math.rad
  283. Vec3 = Vector3.new
  284. cFrame = CFrame.new
  285. Euler = CFrame.fromEulerAnglesXYZ
  286. -------------------------------------------------------
  287.  
  288. necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  289. RSH, LSH = nil, nil
  290. RW = Instance.new("Weld")
  291. LW = Instance.new("Weld")
  292. RH = Torso["Right Hip"]
  293. LH = Torso["Left Hip"]
  294. RSH = Torso["Right Shoulder"]
  295. LSH = Torso["Left Shoulder"]
  296. RSH.Parent = nil
  297. LSH.Parent = nil
  298. RW.Name = "RW"
  299. RW.Part0 = Torso
  300. RW.C0 = CF(1.5, 0.5, 0)
  301. RW.C1 = CF(0, 0.5, 0)
  302. RW.Part1 = ra
  303. RW.Parent = Torso
  304. LW.Name = "LW"
  305. LW.Part0 = Torso
  306. LW.C0 = CF(-1.5, 0.5, 0)
  307. LW.C1 = CF(0, 0.5, 0)
  308. LW.Part1 = la
  309. LW.Parent = Torso
  310. Effects = {}
  311.  
  312. -------------------------------------------------------
  313. h = char.Head
  314. t = char.Torso
  315. rh = Torso["Right Hip"]
  316. lh = Torso["Left Hip"]
  317. nec = Torso.Neck
  318. rut = char.HumanoidRootPart
  319. rutj = rut.RootJoint
  320. it = Instance.new
  321.  
  322. attack = false
  323.  
  324. function SoulSteal(dude)
  325. if dude.Name ~= char then
  326. local bgf = IT("BodyGyro", dude.Head)
  327. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  328. local val = IT("BoolValue", dude)
  329. val.Name = "IsHit"
  330. local torso = (dude:FindFirstChild'Head' or dude:FindFirstChild'Torso' or dude:FindFirstChild'UpperTorso' or dude:FindFirstChild'LowerTorso' or dude:FindFirstChild'HumanoidRootPart')
  331. local soulst = coroutine.wrap(function()
  332. local soul = Instance.new("Part",dude)
  333. soul.Size = Vector3.new(1,1,1)
  334. soul.CanCollide = false
  335. soul.Anchored = false
  336. soul.Position = torso.Position
  337. soul.Transparency = 1
  338. local PartEmmit1 = IT("ParticleEmitter", soul)
  339. PartEmmit1.LightEmission = 1
  340. PartEmmit1.Texture = "rbxassetid://569507414"
  341. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  342. PartEmmit1.Rate = 250
  343. PartEmmit1.Lifetime = NumberRange.new(1.6)
  344. PartEmmit1.Size = NumberSequence.new({
  345. NumberSequenceKeypoint.new(0, 1, 0),
  346. NumberSequenceKeypoint.new(1, 0, 0)
  347. })
  348. PartEmmit1.Transparency = NumberSequence.new({
  349. NumberSequenceKeypoint.new(0, 0, 0),
  350. NumberSequenceKeypoint.new(1, 1, 0)
  351. })
  352. PartEmmit1.Speed = NumberRange.new(0, 0)
  353. PartEmmit1.VelocitySpread = 30000
  354. PartEmmit1.Rotation = NumberRange.new(-360, 360)
  355. PartEmmit1.RotSpeed = NumberRange.new(-360, 360)
  356. local BodPoss = IT("BodyPosition", soul)
  357. BodPoss.P = 3000
  358. BodPoss.D = 1000
  359. BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  360. BodPoss.position = torso.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  361. wait(1.6)
  362. soul.Touched:connect(function(hit)
  363. if hit.Parent == char then
  364. soul:Destroy()
  365. end
  366. end)
  367. wait(1.2)
  368. while soul do
  369. swait()
  370. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  371. BodPoss.Position = tors.Position
  372. end
  373. end)
  374. soulst()
  375. end
  376. end
  377. function FaceMouse()
  378. local Cam = workspace.CurrentCamera
  379. return {
  380. CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)),
  381. Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z)
  382. }
  383. end
  384.  
  385. function Eviscerate(dude)
  386. if dude.Name ~= char then
  387. local bgf = IT("BodyGyro", dude.Head)
  388. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  389. local val = IT("BoolValue", dude)
  390. val.Name = "IsHit"
  391. local ds = coroutine.wrap(function()
  392. dude:WaitForChild("Head"):BreakJoints()
  393. wait(0.75)
  394. target = nil
  395. coroutine.resume(coroutine.create(function()
  396. for i, v in pairs(dude:GetChildren()) do
  397. if v:IsA("Accessory") then
  398. v:Destroy()
  399. end
  400. if v:IsA("Humanoid") then
  401. v:Destroy()
  402. end
  403. if v:IsA("CharacterMesh") then
  404. v:Destroy()
  405. end
  406. if v:IsA("Model") then
  407. v:Destroy()
  408. end
  409. if v:IsA("Part") or v:IsA("MeshPart") then
  410. for x, o in pairs(v:GetChildren()) do
  411. if o:IsA("Decal") then
  412. o:Destroy()
  413. end
  414. end
  415. coroutine.resume(coroutine.create(function()
  416. v.Material = "Neon"
  417. v.CanCollide = false
  418. local PartEmmit1 = IT("ParticleEmitter", v)
  419. PartEmmit1.LightEmission = 1
  420. PartEmmit1.Texture = "rbxassetid://284205403"
  421. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  422. PartEmmit1.Rate = 150
  423. PartEmmit1.Lifetime = NumberRange.new(1)
  424. PartEmmit1.Size = NumberSequence.new({
  425. NumberSequenceKeypoint.new(0, 0.75, 0),
  426. NumberSequenceKeypoint.new(1, 0, 0)
  427. })
  428. PartEmmit1.Transparency = NumberSequence.new({
  429. NumberSequenceKeypoint.new(0, 0, 0),
  430. NumberSequenceKeypoint.new(1, 1, 0)
  431. })
  432. PartEmmit1.Speed = NumberRange.new(0, 0)
  433. PartEmmit1.VelocitySpread = 30000
  434. PartEmmit1.Rotation = NumberRange.new(-500, 500)
  435. PartEmmit1.RotSpeed = NumberRange.new(-500, 500)
  436. local BodPoss = IT("BodyPosition", v)
  437. BodPoss.P = 3000
  438. BodPoss.D = 1000
  439. BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  440. BodPoss.position = v.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  441. v.Color = maincolor.Color
  442. coroutine.resume(coroutine.create(function()
  443. for i = 0, 49 do
  444. swait(1)
  445. v.Transparency = v.Transparency + 0.08
  446. end
  447. wait(0.5)
  448. PartEmmit1.Enabled = false
  449. wait(3)
  450. v:Destroy()
  451. dude:Destroy()
  452. end))
  453. end))
  454. end
  455. end
  456. end))
  457. end)
  458. ds()
  459. end
  460. end
  461.  
  462. function ragdoll(model)
  463. local char = model
  464. torso = char.HumanoidRootPart
  465. torso2 = char.Torso
  466. LW.Parent = nil
  467. RW.Parent = nil
  468. LH.Parent = nil
  469. RH.Parent = nil
  470. if hum ~= nil then
  471. hum.PlatformStand = true
  472. end
  473.  
  474. local Head = char:FindFirstChild("Head")
  475. if Head then
  476. local Neck = Instance.new("Weld")
  477. Neck.Name = "Neck"
  478. Neck.Part0 = torso
  479. Neck.Part1 = Head
  480. Neck.C0 = CFrame.new(0, 1.5, 0)
  481. Neck.C1 = CFrame.new()
  482. Neck.Parent = torso
  483. end
  484. local Limb = char:FindFirstChild("Right Arm")
  485. if Limb then
  486.  
  487. Limb.CFrame = torso.CFrame * CFrame.new(1.5, 0, 0)
  488. local Joint = Instance.new("Glue")
  489. Joint.Name = "RightShoulder"
  490. Joint.Part0 = torso
  491. Joint.Part1 = Limb
  492. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  493. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  494. Joint.Parent = torso
  495.  
  496. local B = Instance.new("Part")
  497. B.TopSurface = 0
  498. B.BottomSurface = 0
  499. B.formFactor = "Symmetric"
  500. B.Size = Vector3.new(1, 1, 1)
  501. B.Transparency = 1
  502. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  503. B.Parent = char
  504. local W = Instance.new("Weld")
  505. W.Part0 = Limb
  506. W.Part1 = B
  507. W.C0 = CFrame.new(0, -0.5, 0)
  508. W.Parent = Limb
  509.  
  510. end
  511. local Limb = char:FindFirstChild("Left Arm")
  512. if Limb then
  513.  
  514. Limb.CFrame = torso.CFrame * CFrame.new(-1.5, 0, 0)
  515. local Joint = Instance.new("Glue")
  516. Joint.Name = "LeftShoulder"
  517. Joint.Part0 = torso
  518. Joint.Part1 = Limb
  519. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  520. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  521. Joint.Parent = torso
  522.  
  523. local B = Instance.new("Part")
  524. B.TopSurface = 0
  525. B.BottomSurface = 0
  526. B.formFactor = "Symmetric"
  527. B.Size = Vector3.new(1, 1, 1)
  528. B.Transparency = 1
  529. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  530. B.Parent = char
  531. local W = Instance.new("Weld")
  532. W.Part0 = Limb
  533. W.Part1 = B
  534. W.C0 = CFrame.new(0, -0.5, 0)
  535. W.Parent = Limb
  536.  
  537. end
  538. local Limb = char:FindFirstChild("Right Leg")
  539. if Limb then
  540.  
  541. Limb.CFrame = torso.CFrame * CFrame.new(0.5, -2, 0)
  542. local Joint = Instance.new("Glue")
  543. Joint.Name = "RightHip"
  544. Joint.Part0 = torso
  545. Joint.Part1 = Limb
  546. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  547. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  548. Joint.Parent = torso
  549.  
  550. local B = Instance.new("Part")
  551. B.TopSurface = 0
  552. B.BottomSurface = 0
  553. B.formFactor = "Symmetric"
  554. B.Size = Vector3.new(1, 1, 1)
  555. B.Transparency = 1
  556. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  557. B.Parent = char
  558. local W = Instance.new("Weld")
  559. W.Part0 = Limb
  560. W.Part1 = B
  561. W.C0 = CFrame.new(0, -0.5, 0)
  562. W.Parent = Limb
  563.  
  564. end
  565. local Limb = char:FindFirstChild("Left Leg")
  566. if Limb then
  567.  
  568. Limb.CFrame = torso.CFrame * CFrame.new(-0.5, -2, 0)
  569. local Joint = Instance.new("Glue")
  570. Joint.Name = "LeftHip"
  571. Joint.Part0 = torso
  572. Joint.Part1 = Limb
  573. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  574. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  575. Joint.Parent = torso
  576.  
  577. local B = Instance.new("Part")
  578. B.TopSurface = 0
  579. B.BottomSurface = 0
  580. B.formFactor = "Symmetric"
  581. B.Size = Vector3.new(1, 1, 1)
  582. B.Transparency = 1
  583. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  584. B.Parent = char
  585. local W = Instance.new("Weld")
  586. W.Part0 = Limb
  587. W.Part1 = B
  588. W.C0 = CFrame.new(0, -0.5, 0)
  589. W.Parent = Limb
  590.  
  591. end
  592. --[
  593. local Bar = Instance.new("Part")
  594. Bar.TopSurface = 0
  595. Bar.BottomSurface = 0
  596. Bar.formFactor = "Symmetric"
  597. Bar.Size = Vector3.new(1, 1, 1)
  598. Bar.Transparency = 1
  599. Bar.CFrame = torso.CFrame * CFrame.new(0, 0.5, 0)
  600. Bar.Parent = char
  601. local Weld = Instance.new("Weld")
  602. Weld.Part0 = torso
  603. Weld.Part1 = Bar
  604. Weld.C0 = CFrame.new(0, 0.5, 0)
  605. Weld.Parent = torso
  606. --]]
  607.  
  608. torso.CFrame = CFrame.new(torso.Position)*CFrame.Angles(math.rad(20),math.rad(torso.Orientation.Y),math.rad(torso.Orientation.Z))
  609.  
  610. end
  611.  
  612. --important--
  613.  
  614. function swait(num)
  615. if num == 0 or num == nil then
  616. game:service("RunService").Stepped:wait(0)
  617. else
  618. for i = 0, num do
  619. game:service("RunService").Stepped:wait(0)
  620. end
  621. end
  622. end
  623. function thread(f)
  624. coroutine.resume(coroutine.create(f))
  625. end
  626. function clerp(a, b, t)
  627. local qa = {
  628. QuaternionFromCFrame(a)
  629. }
  630. local qb = {
  631. QuaternionFromCFrame(b)
  632. }
  633. local ax, ay, az = a.x, a.y, a.z
  634. local bx, by, bz = b.x, b.y, b.z
  635. local _t = 1 - t
  636. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  637. end
  638. function QuaternionFromCFrame(cf)
  639. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  640. local trace = m00 + m11 + m22
  641. if trace > 0 then
  642. local s = math.sqrt(1 + trace)
  643. local recip = 0.5 / s
  644. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  645. else
  646. local i = 0
  647. if m00 < m11 then
  648. i = 1
  649. end
  650. if m22 > (i == 0 and m00 or m11) then
  651. i = 2
  652. end
  653. if i == 0 then
  654. local s = math.sqrt(m00 - m11 - m22 + 1)
  655. local recip = 0.5 / s
  656. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  657. elseif i == 1 then
  658. local s = math.sqrt(m11 - m22 - m00 + 1)
  659. local recip = 0.5 / s
  660. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  661. elseif i == 2 then
  662. local s = math.sqrt(m22 - m00 - m11 + 1)
  663. local recip = 0.5 / s
  664. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  665. end
  666. end
  667. end
  668. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  669. local xs, ys, zs = x + x, y + y, z + z
  670. local wx, wy, wz = w * xs, w * ys, w * zs
  671. local xx = x * xs
  672. local xy = x * ys
  673. local xz = x * zs
  674. local yy = y * ys
  675. local yz = y * zs
  676. local zz = z * zs
  677. 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))
  678. end
  679. function QuaternionSlerp(a, b, t)
  680. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  681. local startInterp, finishInterp
  682. if cosTheta >= 1.0E-4 then
  683. if 1 - cosTheta > 1.0E-4 then
  684. local theta = math.acos(cosTheta)
  685. local invSinTheta = 1 / Sin(theta)
  686. startInterp = Sin((1 - t) * theta) * invSinTheta
  687. finishInterp = Sin(t * theta) * invSinTheta
  688. else
  689. startInterp = 1 - t
  690. finishInterp = t
  691. end
  692. elseif 1 + cosTheta > 1.0E-4 then
  693. local theta = math.acos(-cosTheta)
  694. local invSinTheta = 1 / Sin(theta)
  695. startInterp = Sin((t - 1) * theta) * invSinTheta
  696. finishInterp = Sin(t * theta) * invSinTheta
  697. else
  698. startInterp = t - 1
  699. finishInterp = t
  700. end
  701. 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
  702. end
  703. function rayCast(Position, Direction, Range, Ignore)
  704. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  705. end
  706. local RbxUtility = LoadLibrary("RbxUtility")
  707. local Create = RbxUtility.Create
  708. local insta = true
  709.  
  710. --sounds--
  711.  
  712. THATSHOW = Instance.new("Sound", tors) --thats totally how mafia works dude.
  713. THATSHOW.SoundId = "http://www.roblox.com/asset/?id=2729624531"
  714. THATSHOW.Volume = 10
  715. THATSHOW.Pitch = 1
  716. THATSHOW.Looped = false
  717. THATSHOW.TimePosition = 0
  718.  
  719. --Gud stuff--
  720. chatted = Player.Chatted
  721.  
  722. function MAFIA()
  723. attack = true
  724. THATSHOW:Play()
  725. repeat
  726. for i = 0,0.37,0.03 do
  727. swait()
  728. THATSHOW.Parent = tors
  729. rootj.C0 = clerp(rootj.C0, RootCF * CF(1.25* Player_Size, 0* Player_Size, -0.1 + 0.1* Player_Size * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(20)), 0.2)
  730. tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(0 - 5 * Sin(sine / 20)), Rad(0), Rad(-20)), 0.2)
  731. RH.C0 = clerp(RH.C0, CF(0.5* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-10), Rad(0)) * angles(Rad(0), Rad(0), Rad(5)), 0.8)
  732. LH.C0 = clerp(LH.C0, CF(-0.5* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(10), Rad(0)) * angles(Rad(0), Rad(0), Rad(-5)), 0.8)
  733. RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.1 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(0 + 5 * Sin(sine / 20)), Rad(10 + 5 * Sin(sine / 20))), 0.8)
  734. LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.1 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(0), Rad(-90)), 0.8)
  735. end
  736. for i = 0,0.37,0.03 do
  737. swait()
  738. THATSHOW.Parent = tors
  739. rootj.C0 = clerp(rootj.C0, RootCF * CF(1.25* Player_Size, 0* Player_Size, -0.1 + 0.1* Player_Size * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(20)), 0.2)
  740. tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1* Player_Size) - 1)) * angles(Rad(0 - 5 * Sin(sine / 20)), Rad(0), Rad(-20)), 0.2)
  741. RH.C0 = clerp(RH.C0, CF(0.5* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(-10), Rad(0)) * angles(Rad(0), Rad(0), Rad(5)), 0.8)
  742. LH.C0 = clerp(LH.C0, CF(-0.5* Player_Size, -0.9 - 0.1 * Cos(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(10), Rad(0)) * angles(Rad(0), Rad(0), Rad(-5)), 0.8)
  743. RW.C0 = clerp(RW.C0, CF(1.5* Player_Size, 0.5 + 0.1 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(0 + 5 * Sin(sine / 20)), Rad(10 + 5 * Sin(sine / 20))), 0.8)
  744. LW.C0 = clerp(LW.C0, CF(-1.5* Player_Size, 0.5 + 0.1 * Sin(sine / 20)* Player_Size, 0* Player_Size) * angles(Rad(0), Rad(0), Rad(-90)), 0.8)
  745. end
  746. until THATSHOW.Playing == false
  747. THATSHOW:Stop()
  748. attack = false
  749. hum.WalkSpeed = 16
  750. end
  751.  
  752. --stuffs--
  753.  
  754. mouse.KeyDown:connect(function(key)
  755. if key == 'm' and attack == false then
  756. MAFIA()
  757. end
  758. end)
  759.  
  760. ---ANIMATIONS--
  761.  
  762. local equipped = false
  763. local idle = 0
  764. local change = 1
  765. local val = 0
  766. local toim = 0
  767. local idleanim = 0.4
  768. hum.Animator.Parent = nil
  769. while true do
  770. swait()
  771. sine = sine + change
  772. local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
  773. local velderp = root.Velocity.y
  774. hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4, char)
  775. if equipped == true or equipped == false then
  776. if attack == false then
  777. idle = idle + 1
  778. else
  779. idle = 0
  780. end
  781. if 1 < root.Velocity.y and hitfloor == nil then
  782. Anim = "Jump"
  783. if attack == false then
  784. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(10), Rad(0), Rad(0)), 0.3)
  785. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-40), Rad(0), Rad(0)), 0.3)
  786. RW.C0 = clerp(RW.C0, CF(1.5, 0.5, 0) * angles(Rad(30), Rad(0), Rad(20)), 0.3)
  787. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5, 0) * angles(Rad(-20), Rad(0), Rad(-30)), 0.3)
  788. LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 * Cos(sine / 20), -0.3) * LHCF * angles(Rad(-5), Rad(0), Rad(20)), 0.15)
  789. RH.C0 = clerp(RH.C0, CF(1, -1, 0.3) * angles(Rad(0), Rad(90), Rad(-20)), 0.3)
  790. end
  791. elseif -1 > root.Velocity.y and hitfloor == nil then
  792. Anim = "Fall"
  793. if attack == false then
  794. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(-5), Rad(0), Rad(0)), 0.3)
  795. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(40), Rad(0), Rad(0)), 0.3)
  796. RW.C0 = clerp(RW.C0, CF(1.5, 0.5, 0) * angles(Rad(30), Rad(0), Rad(20)), 0.3)
  797. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5, 0) * angles(Rad(-20), Rad(0), Rad(-30)), 0.3)
  798. LH.C0=clerp(LH.C0, CF(-1,-.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15)
  799. RH.C0=clerp(RH.C0, CF(1,-.3-0.1 * Cos(sine / 20), -.6) * angles(Rad(0), Rad(90), Rad(-20)), .3)
  800. end
  801. elseif torvel < 1 and hitfloor ~= nil then
  802. Anim = "Idle"
  803. change = 1
  804. if attack == false then
  805. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(0)), 0.15)
  806. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  807. 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)
  808. 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)
  809. RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(30 * Cos(sine / 20)), Rad(0), Rad(5)), 0.1)
  810. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 30), 0.025 * Cos(sine / 20)) * angles(Rad(30 * Cos(sine / 20)), Rad(0), Rad(-5)), 0.1)
  811. end
  812. elseif tors.Velocity.magnitude < 50 and hitfloor ~= nil then
  813. Anim = "Walk"
  814. change = 1
  815. if attack == false then
  816. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(9-2.5 * Cos(sine / 3.5)), Rad(0), Rad(10 * Cos(sine / 7))), 0.15)
  817. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  818. RH.C0 = clerp(RH.C0, CFrame.new(1, -0.925 - 0.5 * math.cos(sine / 7) / 2, 0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 - 35 * math.cos(sine / 7)) + -math.sin(sine / 7) / 2.5, math.rad(90 - 2 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 + 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.3)
  819. LH.C0 = clerp(LH.C0, CFrame.new(-1, -0.925 + 0.5 * math.cos(sine / 7) / 2, -0.5 * math.cos(sine / 7) / 2) * angles(math.rad(-15 + 35 * math.cos(sine / 7)) + math.sin(sine / 7) / 2.5, math.rad(-90 - 2 * math.cos(sine / 7)), math.rad(0)) * angles(math.rad(0 - 2.5 * math.cos(sine / 7)), math.rad(0), math.rad(0)), 0.3)
  820. RW.C0 = clerp(RW.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)), 0.1)
  821. 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)), 0.1)
  822. end
  823. end
  824. end
  825. if 0 < #Effects then
  826. for e = 1, #Effects do
  827. if Effects[e] ~= nil then
  828. local Thing = Effects[e]
  829. if Thing ~= nil then
  830. local Part = Thing[1]
  831. local Mode = Thing[2]
  832. local Delay = Thing[3]
  833. local IncX = Thing[4]
  834. local IncY = Thing[5]
  835. local IncZ = Thing[6]
  836. if 1 >= Thing[1].Transparency then
  837. if Thing[2] == "Block1" then
  838. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  839. local Mesh = Thing[1].Mesh
  840. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  841. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  842. elseif Thing[2] == "Block2" then
  843. Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
  844. local Mesh = Thing[7]
  845. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  846. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  847. elseif Thing[2] == "Block3" then
  848. 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)
  849. local Mesh = Thing[7]
  850. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  851. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  852. elseif Thing[2] == "Cylinder" then
  853. local Mesh = Thing[1].Mesh
  854. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  855. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  856. elseif Thing[2] == "Blood" then
  857. local Mesh = Thing[7]
  858. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  859. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  860. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  861. elseif Thing[2] == "Elec" then
  862. local Mesh = Thing[1].Mesh
  863. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  864. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  865. elseif Thing[2] == "Disappear" then
  866. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  867. elseif Thing[2] == "Shatter" then
  868. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  869. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  870. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  871. Thing[6] = Thing[6] + Thing[5]
  872. end
  873. else
  874. Part.Parent = nil
  875. table.remove(Effects, e)
  876. end
  877. end
  878. end
  879. end
  880. end
  881. end
  882. -------------------------------------------------------
  883. --End Animations And Script--
  884. -------------------------------------------------------
  885.  
  886. --u mom--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement