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