Advertisement
battleman22222

sayori

May 1st, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.31 KB | None | 0 0
  1. local plr = game:service'Players'.LocalPlayer
  2. local char = plr.Character
  3. local hum = char.Humanoid
  4. local rarm = char["Right Arm"]
  5. local larm= char["Left Arm"]
  6. local rleg= char["Right Leg"]
  7. local lleg = char["Left Leg"]
  8. local root = char.HumanoidRootPart
  9. local tors = char.Torso
  10. local head = char.Head
  11. local sine = 0;
  12. local change = 1;
  13. local RunS = game:GetService("RunService")
  14. local mouse = plr:GetMouse()
  15. local defAnim = true;
  16.  
  17. local Attachments = {}
  18.  
  19. function GetAttach(p)
  20. for _,v in next, p:children() do
  21. if v:IsA'Attachment' then
  22. table.insert(Attachments,v)
  23. end
  24. GetAttach(v)
  25. end
  26. end
  27.  
  28. GetAttach(char)
  29.  
  30. wait(1)
  31.  
  32. local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
  33. local V3 = {N=Vector3.new}
  34. local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge}
  35. local Effects,Sounds = {},{};
  36.  
  37. for _,v in next, hum:GetPlayingAnimationTracks() do
  38. v:Stop();
  39. end
  40.  
  41. pcall(game.Destroy,char:FindFirstChild'Animate')
  42. pcall(game.Destroy,hum:FindFirstChild'Animator')
  43. hum:SetStateEnabled("Dead",false)
  44. hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
  45.  
  46. Sounds['Wet'] = {Id=256738023,Loop=false,Pitch=1}
  47. Sounds['Swoosh1'] = {Id=320557353,Loop=false,Pitch=1}
  48. Sounds['Swoosh2'] = {Id=320557382,Loop=false,Pitch=1}
  49. Sounds['Swoosh3'] = {Id=320557413,Loop=false,Pitch=1}
  50. Sounds['Swoosh4'] = {Id=320557453,Loop=false,Pitch=1}
  51. Sounds['Swoosh5'] = {Id=320557487,Loop=false,Pitch=1}
  52. Sounds['Swoosh6'] = {Id=320557537,Loop=false,Pitch=1}
  53. Sounds['Swoosh7'] = {Id=320557563,Loop=false,Pitch=1}
  54. Sounds['Swoosh8'] = {Id=320557518,Loop=false,Pitch=1}
  55. Sounds['ShrekRemix'] = {Id=163306929,Loop=true,Pitch=1,Volume = 4}
  56. Sounds['CreoDimension'] = {Id=927529620,Loop=true,Pitch=1,Volume=4}
  57. Sounds['BlackBlizzard'] = {Id=657626121,Loop=true,Pitch=1,Volume=4}
  58. Sounds['ColbreakzFantasy'] = {Id=876981900,Loop=true,Pitch=1,Volume=4}
  59. Sounds['NeflCrystals'] = {Id=340106355,Loop=true,Pitch=1,Volume=4}
  60. Sounds['EvilMortyRemix'] = {Id=1057401232,Loop=true,Pitch=1,Volume=10}
  61. Sounds['SayoFuckYouDan-Nara'] = {Id=1205183071,Loop=true,Pitch=1,Volume = 5}
  62.  
  63.  
  64.  
  65. local NewInstance = function(instance,parent,properties)
  66. local inst = Instance.new(instance,parent)
  67. if(properties)then
  68. for i,v in next, properties do
  69. pcall(function() inst[i] = v end)
  70. end
  71. end
  72. return inst;
  73. end
  74.  
  75. function clerp(a, b, t)
  76. local qa = {
  77. QuaternionFromCFrame(a)
  78. }
  79. local qb = {
  80. QuaternionFromCFrame(b)
  81. }
  82. local ax, ay, az = a.x, a.y, a.z
  83. local bx, by, bz = b.x, b.y, b.z
  84. local _t = 1 - t
  85. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  86. end
  87. function QuaternionFromCFrame(cf)
  88. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  89. local trace = m00 + m11 + m22
  90. if trace > 0 then
  91. local s = math.sqrt(1 + trace)
  92. local recip = 0.5 / s
  93. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  94. else
  95. local i = 0
  96. if m00 < m11 then
  97. i = 1
  98. end
  99. if m22 > (i == 0 and m00 or m11) then
  100. i = 2
  101. end
  102. if i == 0 then
  103. local s = math.sqrt(m00 - m11 - m22 + 1)
  104. local recip = 0.5 / s
  105. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  106. elseif i == 1 then
  107. local s = math.sqrt(m11 - m22 - m00 + 1)
  108. local recip = 0.5 / s
  109. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  110. elseif i == 2 then
  111. local s = math.sqrt(m22 - m00 - m11 + 1)
  112. local recip = 0.5 / s
  113. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  114. end
  115. end
  116. end
  117. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  118. local xs, ys, zs = x + x, y + y, z + z
  119. local wx, wy, wz = w * xs, w * ys, w * zs
  120. local xx = x * xs
  121. local xy = x * ys
  122. local xz = x * zs
  123. local yy = y * ys
  124. local yz = y * zs
  125. local zz = z * zs
  126. 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))
  127. end
  128. function QuaternionSlerp(a, b, t)
  129. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  130. local startInterp, finishInterp
  131. if cosTheta >= 1.0E-4 then
  132. if 1 - cosTheta > 1.0E-4 then
  133. local theta = math.acos(cosTheta)
  134. local invSinTheta = 1 / math.sin(theta)
  135. startInterp = math.sin((1 - t) * theta) * invSinTheta
  136. finishInterp = math.sin(t * theta) * invSinTheta
  137. else
  138. startInterp = 1 - t
  139. finishInterp = t
  140. end
  141. elseif 1 + cosTheta > 1.0E-4 then
  142. local theta = math.acos(-cosTheta)
  143. local invSinTheta = 1 / math.sin(theta)
  144. startInterp = math.sin((t - 1) * theta) * invSinTheta
  145. finishInterp = math.sin(t * theta) * invSinTheta
  146. else
  147. startInterp = t - 1
  148. finishInterp = t
  149. end
  150. 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
  151. end
  152.  
  153. local sndFromData = function(data,parent)
  154. if(typeof(data) == 'table')then
  155. local snd = NewInstance("Sound",parent or char,{SoundId = "rbxassetid://"..data.Id,Looped=data.Loop or false,Pitch = data.Pitch or 1,Volume = data.Volume or 1})
  156. return snd;
  157. else
  158. return error('Argument passed into sndFromData must be a table!',1)
  159. end
  160. end
  161.  
  162. function UnbindLoops()
  163. pcall(RunS.UnbindFromRenderStep,RunS,"N_Effects")
  164. pcall(RunS.UnbindFromRenderStep,RunS,"N_Animations")
  165. end;
  166.  
  167. UnbindLoops()
  168.  
  169. function ragdoll()
  170. char.Archivable = true
  171. local clone = game.Players.LocalPlayer.Character:Clone()
  172. clone.Parent = workspace
  173. for i,v in pairs(clone:GetChildren()) do
  174. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  175. v:destroy()
  176. end
  177. for i,p in pairs(v:GetChildren()) do
  178. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  179. p:destroy()
  180. end
  181. end
  182. end
  183. local leftarm = clone:findFirstChild("Left Arm")
  184. local rightrm = clone:findFirstChild("Right Arm")
  185. local leftleg = clone:findFirstChild("Left Leg")
  186. local rightleg = clone:findFirstChild("Right Leg")
  187. local head = clone:findFirstChild("Head")
  188. char:Destroy()
  189. workspace.CurrentCamera.CameraSubject = head
  190. if head then
  191. local attachment = Instance.new("Attachment", clone.Head)
  192. attachment.Position = Vector3.new(0, -0.5, 0)
  193. attachment.Name = "lol"
  194. attachment.Visible = false
  195. clone.Torso.NeckAttachment.Visible = false
  196. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  197. local ball = Instance.new("BallSocketConstraint", clone)
  198. ball.Attachment0 = clone.Torso.NeckAttachment
  199. ball.Attachment1 = attachment
  200. ball.LimitsEnabled = true
  201. ball.TwistLimitsEnabled = true
  202. ball.UpperAngle = 90
  203. ball.Restitution = 0.5
  204. ball.TwistUpperAngle = 90
  205. ball.TwistLowerAngle = -90
  206. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  207. collidepartofleftleg.Name = "Bone"
  208. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  209. collidepartofleftleg.Transparency = 1
  210. collidepartofleftleg:BreakJoints()
  211. local weeld = Instance.new("Weld", collidepartofleftleg)
  212. weeld.Part0 = collidepartofleftleg
  213. weeld.Part1 = clone["Head"]
  214. end
  215. if leftleg ~= nil then
  216. local glue = Instance.new("Glue", clone.Torso)
  217. glue.Part0 = clone.Torso
  218. glue.Part1 = leftleg
  219. glue.Name = "Left leg"
  220. local collider = Instance.new("Part", leftleg)
  221. collider.Position = Vector3.new(0,999,0)
  222. collider.Size = Vector3.new(1.5, 1, 1)
  223. collider.Shape = "Cylinder"
  224. local weld = Instance.new("Weld", collider)
  225. weld.Part0 = leftleg
  226. weld.Part1 = collider
  227. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  228. collider.TopSurface = "Smooth"
  229. collider.BottomSurface = "Smooth"
  230. collider.formFactor = "Symmetric"
  231. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  232. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  233. collider.Transparency = 1
  234. end
  235. if rightleg ~= nil then
  236. local glue1 = Instance.new("Glue", clone.Torso)
  237. glue1.Part0 = clone.Torso
  238. glue1.Part1 = rightleg
  239. glue1.Name = "Right leg"
  240. local collider1 = Instance.new("Part", rightleg)
  241. collider1.Position = Vector3.new(0,999,0)
  242. collider1.Size = Vector3.new(1.5, 1, 1)
  243. collider1.Shape = "Cylinder"
  244. local weld1 = Instance.new("Weld", collider1)
  245. weld1.Part0 = rightleg
  246. weld1.Part1 = collider1
  247. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  248. collider1.TopSurface = "Smooth"
  249. collider1.BottomSurface = "Smooth"
  250. collider1.formFactor = "Symmetric"
  251. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  252. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  253. collider1.Transparency = 1
  254. end
  255. if rightrm ~= nil then
  256. local glue11 = Instance.new("Glue", clone.Torso)
  257. glue11.Part0 = clone.Torso
  258. glue11.Part1 = rightrm
  259. glue11.Name = "Right shoulder"
  260. local collider11 = Instance.new("Part", rightrm)
  261. collider11.Position = Vector3.new(0,9999,0)
  262. collider11.Size = Vector3.new(1.5,1,1)
  263. collider11.Shape = "Cylinder"
  264. local weld11 = Instance.new("Weld", collider11)
  265. weld11.Part0 = rightrm
  266. weld11.Part1 = collider11
  267. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  268. collider11.TopSurface = "Smooth"
  269. collider11.BottomSurface = "Smooth"
  270. collider11.formFactor = "Symmetric"
  271. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  272. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  273. collider11.Transparency = 1
  274. end
  275.  
  276. if leftarm ~= nil then
  277. local glue111 = Instance.new("Glue", clone.Torso)
  278. glue111.Part0 = clone.Torso
  279. glue111.Part1 = leftarm
  280. glue111.Name = "Left shoulder"
  281. local collider111 = Instance.new("Part", leftarm)
  282. collider111.Position = Vector3.new(0,9999,0)
  283. collider111.Size = Vector3.new(1.5,1,1)
  284. collider111.Shape = "Cylinder"
  285. local weld111 = Instance.new("Weld", collider111)
  286. weld111.Part0 = leftarm
  287. weld111.Part1 = collider111
  288. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  289. collider111.TopSurface = "Smooth"
  290. collider111.BottomSurface = "Smooth"
  291. collider111.formFactor = "Symmetric"
  292. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  293. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  294. collider111.Transparency = 1
  295. end
  296.  
  297. wait(0.5)
  298. coroutine.resume(coroutine.create(function()
  299. while wait() do
  300. clone.Head.CanCollide = false
  301. game:GetService("RunService").Stepped:wait()
  302. end
  303. end))
  304. return clone
  305. end
  306.  
  307.  
  308.  
  309. New = function(Object, Parent, Name, Data)
  310. local Object = Instance.new(Object)
  311. for Index, Value in pairs(Data or {}) do
  312. Object[Index] = Value
  313. end
  314. Object.Parent = Parent
  315. Object.Name = Name
  316. return Object
  317. end
  318.  
  319. Model = New("Model",workspace,"Model",{})
  320. ring = New("Part",Model,"ring",{CanCollide=false,BrickColor = BrickColor.new("Brick yellow"),Elasticity = 0,FormFactor = Enum.FormFactor.Symmetric,Size = Vector3.new(1, 1, 1),CFrame = CFrame.new(-72.0287933, 6.52005148, 33.66502, -0.0191105176, -0.965736747, 0.258819014, -0.246841118, -0.246295646, -0.937234163, 0.96886754, -0.0817982107, -0.233676717),Anchored = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.843137, 0.772549, 0.603922),})
  321. Mesh = New("SpecialMesh",ring,"Mesh",{MeshId = "http://www.roblox.com/asset/?id=3270017",MeshType = Enum.MeshType.FileMesh,})
  322. roof = New("Part",Model,"roof",{CanCollide=false,BrickColor = BrickColor.new("Reddish brown"),FormFactor = Enum.FormFactor.Plate,Size = Vector3.new(3.83999777, 0.200000256, 3.35999894),CFrame = CFrame.new(-71.9617996, 14.1185007, 33.3817253, 0.999999523, 0.000339658902, 0.000940953556, -0.000311135052, 0.999545336, -0.030149797, -0.000950766378, 0.0301494878, 0.999544978),Anchored = true,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.411765, 0.25098, 0.156863),})
  323.  
  324.  
  325. tors.CFrame = tors.CFrame * CFrame.new(0,4,0)
  326. local storedCF = tors.CFrame
  327. roof.CFrame = storedCF * CFrame.new(0,9,0)
  328. ring.CFrame = head.CFrame
  329. local a0 = Instance.new("Attachment",roof)
  330. local a1 = Instance.new("Attachment",ring)
  331.  
  332. local rope = Instance.new("RopeConstraint",roof)
  333. rope.Thickness = 0.1
  334. rope.Color = ring.BrickColor
  335. rope.Attachment0 = a0
  336. rope.Visible = true
  337. rope.Attachment1 = a1
  338. rope.Length = (roof.CFrame.p - ring.CFrame.p).magnitude
  339. wait(.05)
  340. local rag = ragdoll()
  341. plr.Character = rag
  342. Model.Parent = rag
  343. local hw = Instance.new("Weld",rag)
  344. hw.Part0 = rag.Head
  345. hw.Part1 = ring
  346. hw.C1 = CFrame.new(0,0,0.5)*CFrame.Angles(math.rad(90),0,0)
  347.  
  348.  
  349. local Music = sndFromData(Sounds["SayoFuckYouDan-Nara"],rag.Torso)
  350. Music:Play()
  351.  
  352. function CheckState(rPart)
  353. if(rPart.Velocity.y > 1 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
  354. return 'Jump';
  355. elseif(rPart.Velocity.y < -1 and hum:GetState() == Enum.HumanoidStateType.Freefall)then
  356. return 'Fall';
  357. elseif(math.abs(rPart.Velocity.x) > 2 or math.abs(rPart.Velocity.z) > 2 and hum:GetState() ~= Enum.HumanoidStateType.Freefall)then
  358. return 'Walk';
  359. end
  360. return 'Idle';
  361. end
  362.  
  363.  
  364.  
  365.  
  366. hum.Died:connect(function()
  367. UnbindLoops()
  368. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement