Advertisement
TheUnknownDiscord

struck by truck

Jan 3rd, 2022 (edited)
339
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. lower = nil
  2. owner.Chatted:Connect(function(string)
  3. if string:sub(1,4) == "!st " then
  4. lower = string:lower()
  5. for _, plr in next, game:GetService("Players"):GetPlayers() do
  6. if plr.Name:sub(1,#string - 4):lower() == lower:sub(5,#lower) then
  7. coroutine.wrap(function()
  8. local part = Instance.new("Part",script)
  9. part.Anchored = true
  10. local soundp = Instance.new("Part",script)
  11. soundp.Anchored = true
  12. soundp.Size = Vector3.new()
  13. soundp.CFrame = plr.Character:FindFirstChildWhichIsA("BasePart").CFrame
  14. soundp.CanCollide = false
  15. soundp.Transparency = 1
  16. local truck = Instance.new("Sound",soundp)
  17. truck.Volume = 2
  18. truck.SoundId = "http://www.roblox.com/asset/?id=5997147580"
  19. local death = Instance.new("Sound",soundp)
  20. death.Volume = .75
  21. death.SoundId = "http://www.roblox.com/asset/?id=429400881"
  22. local Mesh = Instance.new("SpecialMesh")
  23. Mesh.Parent = part
  24. Mesh.MeshId = "http://www.roblox.com/asset/?id=5950715500"
  25. Mesh.TextureId = "http://www.roblox.com/asset/?id=5950715667"
  26. Mesh.Scale = Vector3.new(7,7,7)
  27. plr.Character:FindFirstChildWhichIsA("BasePart").Anchored = true
  28. part.Size = Vector3.new(7.21,7.448,17.5)
  29. part.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.Angles(0,math.rad(90),0) * CFrame.new(0,1,750)
  30. game:GetService("Debris"):AddItem(part,12)
  31. game:GetService("Debris"):AddItem(soundp,12)
  32. local tweenService = game:GetService("TweenService")
  33. local timeToFade = 12.65
  34. local object = part
  35. local tweenInfo = TweenInfo.new(timeToFade)
  36. local goal = {}
  37. goal.CFrame = plr.Character:FindFirstChildWhichIsA("BasePart").CFrame * CFrame.Angles(0,math.rad(90),0) * CFrame.new(0,1,-750)
  38. local tween = tweenService:Create(object, tweenInfo, goal)
  39. truck:Play()
  40. tween:Play()
  41. part.Velocity = Vector3.new(0,math.huge * -math.huge,0)
  42. wait(3.70)
  43. death:Play()
  44. local rayblacklist = {}
  45. table.insert(rayblacklist,part)
  46. whathit = plr.Character:FindFirstChildWhichIsA("BasePart")
  47. coroutine.wrap(function()
  48. for i = 1, 50 do
  49. coroutine.wrap(function()
  50. local bloodpartfloor = Instance.new("SpawnLocation", workspace)
  51. bloodpartfloor.Enabled = false
  52. bloodpartfloor.CanCollide = false
  53. local random2 = Random.new():NextNumber(-10,10)
  54. local random3 = Random.new():NextNumber(-10,10)
  55. local random = Random.new():NextNumber(0.25,5)
  56. local hitp = Instance.new("SpawnLocation", workspace)
  57. hitp.Enabled = false
  58. hitp.CanCollide = false
  59. hitp.Size = Vector3.new(0.25,0.25,0.25)
  60. hitp.Material = "SmoothPlastic"
  61. hitp.Shape = "Ball"
  62. hitp.CFrame = whathit.CFrame
  63. hitp.BrickColor = BrickColor.new("Maroon")
  64. local attachment0 = Instance.new("Attachment")
  65. attachment0.Parent = hitp
  66. local attachment1 = Instance.new("Attachment")
  67. attachment1.Parent = hitp
  68. attachment1.CFrame = CFrame.new(0,0.0625,0)
  69. attachment0.CFrame = CFrame.new(0,-0.0625,0)
  70. local trail = Instance.new("Trail")
  71. trail.Parent = hitp
  72. trail.Attachment0 = attachment0
  73. trail.Attachment1 = attachment1
  74. trail.Lifetime = .5
  75. trail.WidthScale = NumberSequence.new(0,1,1,0)
  76. trail.Transparency = NumberSequence.new(0,0,1,1)
  77. trail.Color = ColorSequence.new(Color3.fromRGB(255, 21, 0), Color3.fromRGB(196, 16, 0))
  78. hitp:ApplyImpulse(Vector3.new(random2/100,.25,random3/100))
  79. bloodpartfloor.Size = Vector3.new(0.005,0.005,0.005)
  80. bloodpartfloor.CanCollide = false
  81. bloodpartfloor.Material = "Glass"
  82. bloodpartfloor.Shape = "Cylinder"
  83. bloodpartfloor.Anchored = true
  84. table.insert(rayblacklist,bloodpartfloor)
  85. local params2 = RaycastParams.new()
  86. params2.FilterDescendantsInstances = {whathit, plr.Character,rayblacklist}
  87. params2.FilterType = Enum.RaycastFilterType.Blacklist
  88. local result2 = workspace:Raycast(whathit.Position + Vector3.new(random2,0,random3), whathit.Position + Vector3.new(random2,-300,random3), params2)
  89. if result2 then
  90. bloodpartfloor.Position = result2.Position
  91. local currentRightVector2 = whathit.CFrame.RightVector
  92. local upVector2 = result2.Normal
  93. local newFacialVector2 = currentRightVector2:Cross(upVector2)
  94. bloodpartfloor.CFrame = CFrame.fromMatrix(bloodpartfloor.Position, currentRightVector2, upVector2, newFacialVector2) * CFrame.Angles(0,0,math.rad(90))
  95. bloodpartfloor.BrickColor = BrickColor.new("Maroon")
  96. game:GetService("Debris"):AddItem(bloodpartfloor,25)
  97. game:GetService("Debris"):AddItem(hitp,10)
  98. local tweenService = game:GetService("TweenService")
  99. local timeToFade = .25
  100. local object = bloodpartfloor
  101. local tweenInfo = TweenInfo.new(timeToFade)
  102. local goal = {}
  103. goal.Size = Vector3.new(0.005,random,random)
  104. local grow = tweenService:Create(object, tweenInfo, goal)
  105. grow:Play()
  106. end
  107. end)()
  108. end
  109. end)()
  110. for i,v in pairs(plr.Character:GetDescendants()) do
  111. coroutine.wrap(function()
  112. if v:IsA("BasePart") then
  113. v:Destroy()
  114. end
  115. end)()
  116. end
  117. end)()
  118. end
  119. end
  120. elseif string:sub(1,7) == "/e !st " then
  121. lower = string:lower()
  122. for _, plr in next, game:GetService("Players"):GetPlayers() do
  123. if plr.Name:sub(1,#string - 7):lower() == lower:sub(8,#lower) then
  124. coroutine.wrap(function()
  125. local part = Instance.new("Part",script)
  126. part.Anchored = true
  127. local soundp = Instance.new("Part",script)
  128. soundp.Anchored = true
  129. soundp.Size = Vector3.new()
  130. soundp.CFrame = plr.Character:FindFirstChildWhichIsA("BasePart").CFrame
  131. soundp.CanCollide = false
  132. soundp.Transparency = 1
  133. local truck = Instance.new("Sound",soundp)
  134. truck.Volume = 2
  135. truck.SoundId = "http://www.roblox.com/asset/?id=5997147580"
  136. local death = Instance.new("Sound",soundp)
  137. death.Volume = .75
  138. death.SoundId = "http://www.roblox.com/asset/?id=429400881"
  139. local Mesh = Instance.new("SpecialMesh")
  140. Mesh.Parent = part
  141. Mesh.MeshId = "http://www.roblox.com/asset/?id=5950715500"
  142. Mesh.TextureId = "http://www.roblox.com/asset/?id=5950715667"
  143. Mesh.Scale = Vector3.new(7,7,7)
  144. plr.Character:FindFirstChildWhichIsA("BasePart").Anchored = true
  145. part.Size = Vector3.new(7.21,7.448,17.5)
  146. part.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.Angles(0,math.rad(90),0) * CFrame.new(0,1,750)
  147. game:GetService("Debris"):AddItem(part,12)
  148. game:GetService("Debris"):AddItem(soundp,12)
  149. local tweenService = game:GetService("TweenService")
  150. local timeToFade = 12.65
  151. local object = part
  152. local tweenInfo = TweenInfo.new(timeToFade)
  153. local goal = {}
  154. goal.CFrame = plr.Character:FindFirstChildWhichIsA("BasePart").CFrame * CFrame.Angles(0,math.rad(90),0) * CFrame.new(0,1,-750)
  155. local tween = tweenService:Create(object, tweenInfo, goal)
  156. truck:Play()
  157. tween:Play()
  158. part.Velocity = Vector3.new(0,math.huge * -math.huge,0)
  159. wait(3.70)
  160. death:Play()
  161. local rayblacklist = {}
  162. table.insert(rayblacklist,part)
  163. whathit = plr.Character:FindFirstChildWhichIsA("BasePart")
  164. coroutine.wrap(function()
  165. for i = 1, 50 do
  166. coroutine.wrap(function()
  167. local bloodpartfloor = Instance.new("SpawnLocation", workspace)
  168. bloodpartfloor.Enabled = false
  169. bloodpartfloor.CanCollide = false
  170. local random2 = Random.new():NextNumber(-10,10)
  171. local random3 = Random.new():NextNumber(-10,10)
  172. local random = Random.new():NextNumber(0.25,5)
  173. local hitp = Instance.new("SpawnLocation", workspace)
  174. hitp.Enabled = false
  175. hitp.CanCollide = false
  176. hitp.Size = Vector3.new(0.25,0.25,0.25)
  177. hitp.Material = "SmoothPlastic"
  178. hitp.Shape = "Ball"
  179. hitp.CFrame = whathit.CFrame
  180. hitp.BrickColor = BrickColor.new("Maroon")
  181. local attachment0 = Instance.new("Attachment")
  182. attachment0.Parent = hitp
  183. local attachment1 = Instance.new("Attachment")
  184. attachment1.Parent = hitp
  185. attachment1.CFrame = CFrame.new(0,0.0625,0)
  186. attachment0.CFrame = CFrame.new(0,-0.0625,0)
  187. local trail = Instance.new("Trail")
  188. trail.Parent = hitp
  189. trail.Attachment0 = attachment0
  190. trail.Attachment1 = attachment1
  191. trail.Lifetime = .5
  192. trail.WidthScale = NumberSequence.new(0,1,1,0)
  193. trail.Transparency = NumberSequence.new(0,0,1,1)
  194. trail.Color = ColorSequence.new(Color3.fromRGB(255, 21, 0), Color3.fromRGB(196, 16, 0))
  195. hitp:ApplyImpulse(Vector3.new(random2/100,.25,random3/100))
  196. bloodpartfloor.Size = Vector3.new(0.005,0.005,0.005)
  197. bloodpartfloor.CanCollide = false
  198. bloodpartfloor.Material = "Glass"
  199. bloodpartfloor.Shape = "Cylinder"
  200. bloodpartfloor.Anchored = true
  201. table.insert(rayblacklist,bloodpartfloor)
  202. local params2 = RaycastParams.new()
  203. params2.FilterDescendantsInstances = {whathit, plr.Character,rayblacklist}
  204. params2.FilterType = Enum.RaycastFilterType.Blacklist
  205. local result2 = workspace:Raycast(whathit.Position + Vector3.new(random2,0,random3), whathit.Position + Vector3.new(random2,-300,random3), params2)
  206. if result2 then
  207. bloodpartfloor.Position = result2.Position
  208. local currentRightVector2 = whathit.CFrame.RightVector
  209. local upVector2 = result2.Normal
  210. local newFacialVector2 = currentRightVector2:Cross(upVector2)
  211. bloodpartfloor.CFrame = CFrame.fromMatrix(bloodpartfloor.Position, currentRightVector2, upVector2, newFacialVector2) * CFrame.Angles(0,0,math.rad(90))
  212. bloodpartfloor.BrickColor = BrickColor.new("Maroon")
  213. game:GetService("Debris"):AddItem(bloodpartfloor,25)
  214. game:GetService("Debris"):AddItem(hitp,10)
  215. local tweenService = game:GetService("TweenService")
  216. local timeToFade = .25
  217. local object = bloodpartfloor
  218. local tweenInfo = TweenInfo.new(timeToFade)
  219. local goal = {}
  220. goal.Size = Vector3.new(0.005,random,random)
  221. local grow = tweenService:Create(object, tweenInfo, goal)
  222. grow:Play()
  223. end
  224. end)()
  225. end
  226. end)()
  227. for i,v in pairs(plr.Character:GetDescendants()) do
  228. coroutine.wrap(function()
  229. if v:IsA("BasePart") then
  230. v:Destroy()
  231. end
  232. end)()
  233. end
  234. end)()
  235. end
  236. end
  237. end
  238. end)
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement