TheUnknownDiscord

door

Mar 7th, 2022 (edited)
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.44 KB | None | 0 0
  1. local slam = Instance.new("Sound")
  2. slam.Volume = 2
  3. slam.PlayOnRemove = true
  4. slam.PlaybackSpeed = 0.5
  5. slam.SoundId = "rbxassetid://7463779780"
  6. local db = false
  7. local finish = false
  8. CreateRegion3FromLocAndSize = function(Position, Size)
  9.  
  10. local SizeOffset = Size / 2
  11. local Point1 = Position - SizeOffset
  12. local Point2 = Position + SizeOffset
  13. return Region3.new(Point1, Point2)
  14. end
  15. function door()
  16. if not db then
  17. db = true
  18. local jp,ws,ro = owner.Character.Humanoid.JumpPower,owner.Character.Humanoid.WalkSpeed,owner.Character.Humanoid.AutoRotate
  19. owner.Character.Humanoid.WalkSpeed = 0
  20. owner.Character.Humanoid.JumpPower = 0
  21. owner.Character.Humanoid.AutoRotate = false
  22. local part = Instance.new("Part",script)
  23. part.Anchored = true
  24. part.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-2.25,-7.75,-3)
  25. part.Size = Vector3.new(0.125,6.5,0.5)
  26. local part2 = Instance.new("Part",script)
  27. part2.Anchored = true
  28. part2.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(2.25,-7.75,-3)
  29. part2.Size = Vector3.new(0.125,6.5,0.5)
  30. local part3 = Instance.new("Part",script)
  31. part3.Anchored = true
  32. part3.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,-4.438,-3)
  33. part3.Size = Vector3.new(4.625,0.125,0.5)
  34. local part4 = Instance.new("Part",script)
  35. part4.Anchored = true
  36. part4.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,-7.75,-3)
  37. part4.Size = Vector3.new(4.425,6.5,0.125)
  38. local part5 = Instance.new("Part",script)
  39. part5.Anchored = true
  40. part5.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(1,-6.25,-3)
  41. part5.Size = Vector3.new(1.5,2.5,0.1875)
  42. local part6 = Instance.new("Part",script)
  43. part6.Anchored = true
  44. part6.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-1,-6.25,-3)
  45. part6.Size = Vector3.new(1.5,2.5,0.1875)
  46. local part7 = Instance.new("Part",script)
  47. part7.Anchored = true
  48. part7.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(1,-9.5,-3)
  49. part7.Size = Vector3.new(1.5,2.5,0.1875)
  50. local part8 = Instance.new("Part",script)
  51. part8.Anchored = true
  52. part8.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-1,-9.5,-3)
  53. part8.Size = Vector3.new(1.5,2.5,0.1875)
  54. local part9 = Instance.new("Part",script)
  55. part9.Anchored = true
  56. part9.Shape = "Cylinder"
  57. part9.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-1.25,-7.875,-3) * CFrame.Angles(0,math.rad(90),0)
  58. part9.Size = Vector3.new(0.1875,0.25,0.25)
  59. part.Material = "SmoothPlastic"
  60. part2.Material = "SmoothPlastic"
  61. part3.Material = "SmoothPlastic"
  62. part4.Material = "Wood"
  63. part5.Material = "Wood"
  64. part6.Material = "Wood"
  65. part7.Material = "Wood"
  66. part8.Material = "Wood"
  67. part.Color = Color3.fromRGB(56, 56, 56)
  68. part2.Color = Color3.fromRGB(56, 56, 56)
  69. part3.Color = Color3.fromRGB(56, 56, 56)
  70. part4.Color = Color3.fromRGB(99, 65, 0)
  71. part5.Color = Color3.fromRGB(92, 60, 0)
  72. part6.Color = Color3.fromRGB(92, 60, 0)
  73. part7.Color = Color3.fromRGB(92, 60, 0)
  74. part8.Color = Color3.fromRGB(92, 60, 0)
  75. local partta = {part,part2,part3,part4,part5,part6,part7,part8,part9}
  76. local partta2 = {part,part2,part3}
  77. function welconst(par1,par2)
  78. local weld = Instance.new("WeldConstraint",par1)
  79. weld.Part1 = par1
  80. weld.Part0 = par2
  81. par2.Anchored = false
  82. end
  83. welconst(part4,part5)
  84. welconst(part4,part6)
  85. welconst(part4,part7)
  86. welconst(part4,part8)
  87. welconst(part4,part9)
  88. part4.Anchored = false
  89. local weld = Instance.new("Weld",part2)
  90. weld.Part0 = part4
  91. weld.Part1 = part2
  92. weld.C1 = CFrame.new(-0.125,0,-2.25)
  93. weld.C0 = CFrame.new(2.175,0,-2.25)
  94.  
  95. wait(0.125)
  96. for i,v in pairs(partta2) do
  97. local tweenService = game:GetService("TweenService")
  98. local timeToFade = 0.125
  99. local object = v
  100. local tweenInfo = TweenInfo.new(timeToFade)
  101. local goal = {}
  102. goal.CFrame = object.CFrame * CFrame.new(0,8,0)
  103.  
  104. local tween = tweenService:Create(object, tweenInfo, goal)
  105. tween:Play()
  106. end
  107. wait(0.125)
  108. local rightarm = Instance.new("Weld", owner.Character.Torso)
  109. rightarm.Part0 = owner.Character.Torso
  110. rightarm.Part1 = owner.Character["Right Arm"]
  111. rightarm.C0 = CFrame.new(1.5, 0.75, 0)
  112. rightarm.C1 = CFrame.new(0,0.7,0)
  113. rightarm.Name = "f"
  114. local leftarm = Instance.new("Weld", owner.Character.Torso)
  115. leftarm.Part0 = owner.Character.Torso
  116. leftarm.Part1 = owner.Character["Left Arm"]
  117. leftarm.C0 = CFrame.new(-1.5, 0.75, 0)
  118. leftarm.C1 = CFrame.new(0,0.7,0)
  119. leftarm.Name = "e"
  120. local rightleg = Instance.new("Weld", owner.Character.Torso)
  121. rightleg.Part0 = owner.Character.Torso
  122. rightleg.Part1 = owner.Character["Right Leg"]
  123. rightleg.C0 = CFrame.new(0.5,-1,0)
  124. rightleg.C1 = CFrame.new(0,1,0)
  125. rightleg.Name = "d"
  126. local leftleg = Instance.new("Weld", owner.Character.Torso)
  127. leftleg.Part0 = owner.Character.Torso
  128. leftleg.Part1 = owner.Character["Left Leg"]
  129. leftleg.C0 = CFrame.new(-0.5,-1,0)
  130. leftleg.C1 = CFrame.new(0,1,0)
  131. leftleg.Name = "c"
  132. owner.Character.Humanoid.RequiresNeck = false
  133. local head = Instance.new("Weld", owner.Character.Torso)
  134. head.Part0 = owner.Character.Torso
  135. head.Part1 = owner.Character.Head
  136. head.C0 = CFrame.new(0, 1.5, 0)
  137. head.C1 = CFrame.new(0,0,0)
  138. head.Name = "b"
  139. local humanoidrootpart = Instance.new("Weld", owner.Character.HumanoidRootPart)
  140. humanoidrootpart.Part0 = owner.Character.HumanoidRootPart
  141. humanoidrootpart.Part1 = owner.Character.Torso
  142. humanoidrootpart.Name = "a"
  143. local tweenService = game:GetService("TweenService")
  144. local timeToFade = 0.175
  145. local object = rightleg
  146. local object2 = humanoidrootpart
  147. local object3 = rightarm
  148. local object4 = leftleg
  149. local object5 = leftarm
  150. local tweenInfo = TweenInfo.new(timeToFade)
  151. local goal3 = {}
  152. goal3.C0 = CFrame.new(0.5, -1, 0.25) * CFrame.Angles(math.rad(-25),0,0)
  153.  
  154. local tween3 = tweenService:Create(object, tweenInfo, goal3)
  155. local goal4 = {}
  156. goal4.C0 = CFrame.new(0, 0, -0.35) * CFrame.Angles(math.rad(-15),0,math.rad(-10))
  157.  
  158. local tween4 = tweenService:Create(object2, tweenInfo, goal4)
  159. local goal5 = {}
  160. goal5.C0 = CFrame.new(1, 0.5, -1.125) * CFrame.Angles(math.rad(140),0,0) * CFrame.Angles(0,0,math.rad(-55))
  161.  
  162. local tween5 = tweenService:Create(object3, tweenInfo, goal5)
  163. local goal8 = {}
  164. goal8.C0 = CFrame.new(-0.65, -1, -0.25) * CFrame.Angles(math.rad(25),0,math.rad(10))
  165.  
  166. local tween8 = tweenService:Create(object4, tweenInfo, goal8)
  167. local goal10 = {}
  168. goal10.C0 = CFrame.new(-1.5, 0.5, 0.85) * CFrame.Angles(math.rad(80),0,0) * CFrame.Angles(0,0,math.rad(-105))
  169. local tween10 = tweenService:Create(object5, tweenInfo, goal10)
  170. tween3:Play()
  171. tween4:Play()
  172. tween5:Play()
  173. tween8:Play()
  174. tween10:Play()
  175. tween3.Completed:Wait()
  176. wait(0.25)
  177. local timeToFade = 0.25
  178. local tweenInfo = TweenInfo.new(timeToFade)
  179. local goal = {}
  180. goal.C0 = CFrame.new(0.5, -1, -0.35) * CFrame.Angles(math.rad(55),0,0)
  181.  
  182. local tween = tweenService:Create(object, tweenInfo, goal)
  183. local goal2 = {}
  184. goal2.C0 = CFrame.new(0, 0, 0.35) * CFrame.Angles(math.rad(35),0,math.rad(10))
  185.  
  186. local tween2 = tweenService:Create(object2, tweenInfo, goal2)
  187. local goal6 = {}
  188. goal6.C0 = CFrame.new(1.5, 0.5, 0.85) * CFrame.Angles(math.rad(80),0,0) * CFrame.Angles(0,0,math.rad(105))
  189.  
  190. local tween6 = tweenService:Create(object3, tweenInfo, goal6)
  191. local goal7 = {}
  192. goal7.C0 = CFrame.new(-0.5, -1, 0.25) * CFrame.Angles(math.rad(-35),0,math.rad(-10))
  193.  
  194. local tween7 = tweenService:Create(object4, tweenInfo, goal7)
  195. local goal9 = {}
  196. goal9.C0 = CFrame.new(-1, 0.25, -1.125) * CFrame.Angles(math.rad(140),0,0) * CFrame.Angles(0,0,math.rad(55))
  197. local tween9 = tweenService:Create(object5, tweenInfo, goal9)
  198. tween:Play()
  199. tween2:Play()
  200. tween6:Play()
  201. tween7:Play()
  202. tween9:Play()
  203. tween9.Completed:Connect(function()
  204. finish = true
  205. end)
  206. wait(0.15)
  207. finish = false
  208. slam.Parent = part4
  209. slam.PlaybackSpeed = 0.5
  210. slam.Parent = nil
  211. local tweenService = game:GetService("TweenService")
  212. local timeToFade = 0.0725
  213. local object = weld
  214. local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out)
  215. local goal = {}
  216. goal.C0 = CFrame.Angles(0,math.rad(90),0)
  217.  
  218. local tween11 = tweenService:Create(object, tweenInfo, goal)
  219. tween11:Play()
  220. local donthit = {owner.Character}
  221. while not finish do
  222. task.wait()
  223. local ps = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-5)
  224. local reg = CreateRegion3FromLocAndSize(ps.p, Vector3.new(10, 10, 6.5))
  225. for i,v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, donthit, math.huge * -math.huge)) do
  226. if v.Parent:FindFirstChildWhichIsA("Humanoid") and not table.find(donthit,v.Parent) then
  227. v.Parent:FindFirstChildWhichIsA("Humanoid").Health -= 78
  228. local yy = Instance.new("BodyVelocity")
  229. yy.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  230. yy.Velocity = CFrame.new(v.Parent:FindFirstChildWhichIsA("Part").Position,part4.Position).lookVector * -40 + Vector3.new(0,15,0)
  231. yy.Parent = v.Parent:FindFirstChildWhichIsA("Part")
  232. game.Debris:AddItem(yy,0.6)
  233. spawn(function()
  234. while wait(0.1) do
  235. yy.Velocity = yy.Velocity - Vector3.new(5,5,0)
  236. end
  237. end)
  238. table.insert(donthit,v.Parent)
  239. end
  240. end
  241. end
  242. wait(0.5)
  243. for i,v in pairs(partta) do
  244. local tweenService = game:GetService("TweenService")
  245. local timeToFade = 2.175
  246. local object = v
  247. local tweenInfo = TweenInfo.new(timeToFade)
  248. local goal = {}
  249. goal.Transparency = 1
  250.  
  251. local tween = tweenService:Create(object, tweenInfo, goal)
  252. tween:Play()
  253. game:GetService("Debris"):AddItem(v,2.175)
  254. end
  255. for i,v in pairs(owner.Character:GetDescendants()) do
  256. if v:IsA("Weld") then
  257. if v.Name == "a" then
  258. local tweenService = game:GetService("TweenService")
  259. local timeToFade = 0.175
  260. local object = v
  261. local tweenInfo = TweenInfo.new(timeToFade)
  262. local goal = {}
  263. goal.C0 = CFrame.new()
  264.  
  265. local tween = tweenService:Create(object, tweenInfo, goal)
  266. tween:Play()
  267. game:GetService("Debris"):AddItem(v,0.175)
  268. elseif v.Name == "b" then
  269. game:GetService("Debris"):AddItem(v,0.175)
  270. elseif v.Name == "c" then
  271. local tweenService = game:GetService("TweenService")
  272. local timeToFade = 0.175
  273. local object = v
  274. local tweenInfo = TweenInfo.new(timeToFade)
  275. local goal = {}
  276. goal.C0 = CFrame.new(-0.5,-1,0)
  277.  
  278. local tween = tweenService:Create(object, tweenInfo, goal)
  279. tween:Play()
  280. game:GetService("Debris"):AddItem(v,0.175)
  281. elseif v.Name == "d" then
  282. local tweenService = game:GetService("TweenService")
  283. local timeToFade = 0.175
  284. local object = v
  285. local tweenInfo = TweenInfo.new(timeToFade)
  286. local goal = {}
  287. goal.C0 = CFrame.new(0.5,-1,0)
  288.  
  289. local tween = tweenService:Create(object, tweenInfo, goal)
  290. tween:Play()
  291. game:GetService("Debris"):AddItem(v,0.175)
  292. elseif v.Name == "e" then
  293. local tweenService = game:GetService("TweenService")
  294. local timeToFade = 0.175
  295. local object = v
  296. local tweenInfo = TweenInfo.new(timeToFade)
  297. local goal = {}
  298. goal.C0 = CFrame.new(-1.5,0.75,0)
  299.  
  300. local tween = tweenService:Create(object, tweenInfo, goal)
  301. tween:Play()
  302. game:GetService("Debris"):AddItem(v,0.175)
  303. elseif v.Name == "f" then
  304. local tweenService = game:GetService("TweenService")
  305. local timeToFade = 0.175
  306. local object = v
  307. local tweenInfo = TweenInfo.new(timeToFade)
  308. local goal = {}
  309. goal.C0 = CFrame.new(1.5,0.75,0)
  310.  
  311. local tween = tweenService:Create(object, tweenInfo, goal)
  312. tween:Play()
  313. game:GetService("Debris"):AddItem(v,0.175)
  314. end
  315. end
  316. end
  317. wait(0.175)
  318. owner.Character.Humanoid.WalkSpeed = ws
  319. owner.Character.Humanoid.JumpPower = jp
  320. owner.Character.Humanoid.AutoRotate = ro
  321. wait(1.5)
  322. db = false
  323. end
  324. end
  325. function quickdoor()
  326. if not db then
  327. db = true
  328. local jp,ws,ro = owner.Character.Humanoid.JumpPower,owner.Character.Humanoid.WalkSpeed,owner.Character.Humanoid.AutoRotate
  329. owner.Character.Humanoid.WalkSpeed = 0
  330. owner.Character.Humanoid.JumpPower = 0
  331. owner.Character.Humanoid.AutoRotate = false
  332. local part = Instance.new("Part",script)
  333. part.Anchored = true
  334. part.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-2.25,-7.75,-3)
  335. part.Size = Vector3.new(0.125,6.5,0.5)
  336. local part2 = Instance.new("Part",script)
  337. part2.Anchored = true
  338. part2.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(2.25,-7.75,-3)
  339. part2.Size = Vector3.new(0.125,6.5,0.5)
  340. local part3 = Instance.new("Part",script)
  341. part3.Anchored = true
  342. part3.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,-4.438,-3)
  343. part3.Size = Vector3.new(4.625,0.125,0.5)
  344. local part4 = Instance.new("Part",script)
  345. part4.Anchored = true
  346. part4.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,-7.75,-3)
  347. part4.Size = Vector3.new(4.425,6.5,0.125)
  348. local part5 = Instance.new("Part",script)
  349. part5.Anchored = true
  350. part5.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(1,-6.25,-3)
  351. part5.Size = Vector3.new(1.5,2.5,0.1875)
  352. local part6 = Instance.new("Part",script)
  353. part6.Anchored = true
  354. part6.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-1,-6.25,-3)
  355. part6.Size = Vector3.new(1.5,2.5,0.1875)
  356. local part7 = Instance.new("Part",script)
  357. part7.Anchored = true
  358. part7.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(1,-9.5,-3)
  359. part7.Size = Vector3.new(1.5,2.5,0.1875)
  360. local part8 = Instance.new("Part",script)
  361. part8.Anchored = true
  362. part8.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-1,-9.5,-3)
  363. part8.Size = Vector3.new(1.5,2.5,0.1875)
  364. local part9 = Instance.new("Part",script)
  365. part9.Anchored = true
  366. part9.Shape = "Cylinder"
  367. part9.CFrame = owner.Character.HumanoidRootPart.CFrame * CFrame.new(-1.25,-7.875,-3) * CFrame.Angles(0,math.rad(90),0)
  368. part9.Size = Vector3.new(0.1875,0.25,0.25)
  369. part.Material = "SmoothPlastic"
  370. part2.Material = "SmoothPlastic"
  371. part3.Material = "SmoothPlastic"
  372. part4.Material = "Wood"
  373. part5.Material = "Wood"
  374. part6.Material = "Wood"
  375. part7.Material = "Wood"
  376. part8.Material = "Wood"
  377. part.Color = Color3.fromRGB(56, 56, 56)
  378. part2.Color = Color3.fromRGB(56, 56, 56)
  379. part3.Color = Color3.fromRGB(56, 56, 56)
  380. part4.Color = Color3.fromRGB(99, 65, 0)
  381. part5.Color = Color3.fromRGB(92, 60, 0)
  382. part6.Color = Color3.fromRGB(92, 60, 0)
  383. part7.Color = Color3.fromRGB(92, 60, 0)
  384. part8.Color = Color3.fromRGB(92, 60, 0)
  385. local partta = {part,part2,part3,part4,part5,part6,part7,part8,part9}
  386. local partta2 = {part,part2,part3}
  387. function welconst(par1,par2)
  388. local weld = Instance.new("WeldConstraint",par1)
  389. weld.Part1 = par1
  390. weld.Part0 = par2
  391. par2.Anchored = false
  392. end
  393. welconst(part4,part5)
  394. welconst(part4,part6)
  395. welconst(part4,part7)
  396. welconst(part4,part8)
  397. welconst(part4,part9)
  398. part4.Anchored = false
  399. local weld = Instance.new("Weld",part2)
  400. weld.Part0 = part4
  401. weld.Part1 = part2
  402. weld.C1 = CFrame.new(-0.125,0,-2.25)
  403. weld.C0 = CFrame.new(2.175,0,-2.25)
  404.  
  405. wait(0.0625)
  406. for i,v in pairs(partta2) do
  407. local tweenService = game:GetService("TweenService")
  408. local timeToFade = 0.0625
  409. local object = v
  410. local tweenInfo = TweenInfo.new(timeToFade)
  411. local goal = {}
  412. goal.CFrame = object.CFrame * CFrame.new(0,8,0)
  413.  
  414. local tween = tweenService:Create(object, tweenInfo, goal)
  415. tween:Play()
  416. end
  417. wait(0.0625)
  418. local rightarm = Instance.new("Weld", owner.Character.Torso)
  419. rightarm.Part0 = owner.Character.Torso
  420. rightarm.Part1 = owner.Character["Right Arm"]
  421. rightarm.C0 = CFrame.new(1.5, 0.75, 0)
  422. rightarm.C1 = CFrame.new(0,0.7,0)
  423. rightarm.Name = "f"
  424. local leftarm = Instance.new("Weld", owner.Character.Torso)
  425. leftarm.Part0 = owner.Character.Torso
  426. leftarm.Part1 = owner.Character["Left Arm"]
  427. leftarm.C0 = CFrame.new(-1.5, 0.75, 0)
  428. leftarm.C1 = CFrame.new(0,0.7,0)
  429. leftarm.Name = "e"
  430. local rightleg = Instance.new("Weld", owner.Character.Torso)
  431. rightleg.Part0 = owner.Character.Torso
  432. rightleg.Part1 = owner.Character["Right Leg"]
  433. rightleg.C0 = CFrame.new(0.5,-1,0)
  434. rightleg.C1 = CFrame.new(0,1,0)
  435. rightleg.Name = "d"
  436. local leftleg = Instance.new("Weld", owner.Character.Torso)
  437. leftleg.Part0 = owner.Character.Torso
  438. leftleg.Part1 = owner.Character["Left Leg"]
  439. leftleg.C0 = CFrame.new(-0.5,-1,0)
  440. leftleg.C1 = CFrame.new(0,1,0)
  441. leftleg.Name = "c"
  442. owner.Character.Humanoid.RequiresNeck = false
  443. local head = Instance.new("Weld", owner.Character.Torso)
  444. head.Part0 = owner.Character.Torso
  445. head.Part1 = owner.Character.Head
  446. head.C0 = CFrame.new(0, 1.5, 0)
  447. head.C1 = CFrame.new(0,0,0)
  448. head.Name = "b"
  449. local humanoidrootpart = Instance.new("Weld", owner.Character.HumanoidRootPart)
  450. humanoidrootpart.Part0 = owner.Character.HumanoidRootPart
  451. humanoidrootpart.Part1 = owner.Character.Torso
  452. humanoidrootpart.Name = "a"
  453. local tweenService = game:GetService("TweenService")
  454. local object = rightleg
  455. local object2 = humanoidrootpart
  456. local object3 = rightarm
  457. local object4 = leftleg
  458. local object5 = leftarm
  459. local timeToFade = 0.25
  460. local tweenInfo = TweenInfo.new(timeToFade)
  461. local goal = {}
  462. goal.C0 = CFrame.new(0.5, -1, -0.35) * CFrame.Angles(math.rad(55),0,0)
  463.  
  464. local tween = tweenService:Create(object, tweenInfo, goal)
  465. local goal2 = {}
  466. goal2.C0 = CFrame.new(0, 0, 0.35) * CFrame.Angles(math.rad(35),0,math.rad(10))
  467.  
  468. local tween2 = tweenService:Create(object2, tweenInfo, goal2)
  469. local goal6 = {}
  470. goal6.C0 = CFrame.new(1.5, 0.5, 0.85) * CFrame.Angles(math.rad(80),0,0) * CFrame.Angles(0,0,math.rad(105))
  471.  
  472. local tween6 = tweenService:Create(object3, tweenInfo, goal6)
  473. local goal7 = {}
  474. goal7.C0 = CFrame.new(-0.5, -1, 0.25) * CFrame.Angles(math.rad(-35),0,math.rad(-10))
  475.  
  476. local tween7 = tweenService:Create(object4, tweenInfo, goal7)
  477. local goal9 = {}
  478. goal9.C0 = CFrame.new(-1, 0.25, -1.125) * CFrame.Angles(math.rad(140),0,0) * CFrame.Angles(0,0,math.rad(55))
  479. local tween9 = tweenService:Create(object5, tweenInfo, goal9)
  480. tween:Play()
  481. tween2:Play()
  482. tween6:Play()
  483. tween7:Play()
  484. tween9:Play()
  485. tween9.Completed:Connect(function()
  486. finish = true
  487. end)
  488. wait(0.15)
  489. finish = false
  490. slam.Parent = part4
  491. slam.PlaybackSpeed = 0.85
  492. slam.Parent = nil
  493. local tweenService = game:GetService("TweenService")
  494. local timeToFade = 0.0725
  495. local object = weld
  496. local tweenInfo = TweenInfo.new(timeToFade,Enum.EasingStyle.Exponential,Enum.EasingDirection.Out)
  497. local goal = {}
  498. goal.C0 = CFrame.Angles(0,math.rad(90),0)
  499.  
  500. local tween11 = tweenService:Create(object, tweenInfo, goal)
  501. tween11:Play()
  502. local donthit = {owner.Character}
  503. while not finish do
  504. task.wait()
  505. local ps = owner.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-5)
  506. local reg = CreateRegion3FromLocAndSize(ps.p, Vector3.new(6.5, 8, 3.5))
  507. for i,v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, donthit, math.huge * -math.huge)) do
  508. if v.Parent:FindFirstChildWhichIsA("Humanoid") and not table.find(donthit,v.Parent) then
  509. v.Parent:FindFirstChildWhichIsA("Humanoid").Health -= 28
  510. local yy = Instance.new("BodyVelocity")
  511. yy.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  512. yy.Velocity = CFrame.new(v.Parent:FindFirstChildWhichIsA("Part").Position,part4.Position).lookVector * -40 + Vector3.new(0,15,0)
  513. yy.Parent = v.Parent:FindFirstChildWhichIsA("Part")
  514. game.Debris:AddItem(yy,0.6)
  515. spawn(function()
  516. while wait(0.1) do
  517. yy.Velocity = yy.Velocity - Vector3.new(5,5,0)
  518. end
  519. end)
  520. table.insert(donthit,v.Parent)
  521. end
  522. end
  523. end
  524. wait(0.125)
  525. for i,v in pairs(partta) do
  526. local tweenService = game:GetService("TweenService")
  527. local timeToFade = 1.175
  528. local object = v
  529. local tweenInfo = TweenInfo.new(timeToFade)
  530. local goal = {}
  531. goal.Transparency = 1
  532.  
  533. local tween = tweenService:Create(object, tweenInfo, goal)
  534. tween:Play()
  535. game:GetService("Debris"):AddItem(v,1.175)
  536. end
  537. for i,v in pairs(owner.Character:GetDescendants()) do
  538. if v:IsA("Weld") then
  539. if v.Name == "a" then
  540. local tweenService = game:GetService("TweenService")
  541. local timeToFade = 0.175
  542. local object = v
  543. local tweenInfo = TweenInfo.new(timeToFade)
  544. local goal = {}
  545. goal.C0 = CFrame.new()
  546.  
  547. local tween = tweenService:Create(object, tweenInfo, goal)
  548. tween:Play()
  549. game:GetService("Debris"):AddItem(v,0.175)
  550. elseif v.Name == "b" then
  551. game:GetService("Debris"):AddItem(v,0.175)
  552. elseif v.Name == "c" then
  553. local tweenService = game:GetService("TweenService")
  554. local timeToFade = 0.175
  555. local object = v
  556. local tweenInfo = TweenInfo.new(timeToFade)
  557. local goal = {}
  558. goal.C0 = CFrame.new(-0.5,-1,0)
  559.  
  560. local tween = tweenService:Create(object, tweenInfo, goal)
  561. tween:Play()
  562. game:GetService("Debris"):AddItem(v,0.175)
  563. elseif v.Name == "d" then
  564. local tweenService = game:GetService("TweenService")
  565. local timeToFade = 0.175
  566. local object = v
  567. local tweenInfo = TweenInfo.new(timeToFade)
  568. local goal = {}
  569. goal.C0 = CFrame.new(0.5,-1,0)
  570.  
  571. local tween = tweenService:Create(object, tweenInfo, goal)
  572. tween:Play()
  573. game:GetService("Debris"):AddItem(v,0.175)
  574. elseif v.Name == "e" then
  575. local tweenService = game:GetService("TweenService")
  576. local timeToFade = 0.175
  577. local object = v
  578. local tweenInfo = TweenInfo.new(timeToFade)
  579. local goal = {}
  580. goal.C0 = CFrame.new(-1.5,0.75,0)
  581.  
  582. local tween = tweenService:Create(object, tweenInfo, goal)
  583. tween:Play()
  584. game:GetService("Debris"):AddItem(v,0.175)
  585. elseif v.Name == "f" then
  586. local tweenService = game:GetService("TweenService")
  587. local timeToFade = 0.175
  588. local object = v
  589. local tweenInfo = TweenInfo.new(timeToFade)
  590. local goal = {}
  591. goal.C0 = CFrame.new(1.5,0.75,0)
  592.  
  593. local tween = tweenService:Create(object, tweenInfo, goal)
  594. tween:Play()
  595. game:GetService("Debris"):AddItem(v,0.175)
  596. end
  597. end
  598. end
  599. wait(0.175)
  600. owner.Character.Humanoid.WalkSpeed = ws
  601. owner.Character.Humanoid.JumpPower = jp
  602. owner.Character.Humanoid.AutoRotate = ro
  603. wait(0.75)
  604. db = false
  605. end
  606. end
  607. local E = Instance.new("RemoteEvent",owner.Character)
  608. local E2 = Instance.new("RemoteEvent",owner.Character)
  609. E2.Name = "doorfacts"
  610. NLS([[
  611. local E = owner.Character:FindFirstChildWhichIsA("RemoteEvent")
  612. local E2 = owner.Character:WaitForChild("doorfacts")
  613. local Mouse = owner:GetMouse()
  614. Mouse.KeyDown:Connect(function(key)
  615. key = key:lower()
  616. if key == "q" then
  617. E:FireServer()
  618. elseif key == "e" then
  619. E2:FireServer()
  620. end
  621. end)
  622. ]],owner.PlayerGui)
  623. E.OnServerEvent:Connect(door)
  624. E2.OnServerEvent:Connect(quickdoor)
Add Comment
Please, Sign In to add comment