Advertisement
Guest User

Over

a guest
Nov 11th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.18 KB | None | 0 0
  1. local Replicated = game:GetService("ReplicatedStorage")
  2. game.StarterPlayer.EnableMouseLockOption = false
  3. local Debounce = false
  4.  
  5.  
  6. Replicated.Remotes.APRemote.OnServerInvoke = function(Player)
  7. if Debounce == false then
  8. Debounce = true
  9.  
  10. local Char = Player.Character
  11.  
  12.  
  13. local function onTouched()
  14. if Char:findFirstChild("Humanoid") ~= nil and Char:findFirstChild("Chest") == nil then
  15. local APModel = game.ReplicatedStorage.Equipment.APModel
  16.  
  17.  
  18.  
  19. local g = APModel.Chest:clone()
  20. g.Parent = Char
  21. local C = g:GetChildren()
  22. g.Middle.Transparency = 1
  23. for i=1, #C do
  24. if C[i].className == "Part" or C[i].className == "WedgePart" or C[i].className == "UnionOperation" or C[i].className == "MeshPart" then
  25. local W = Instance.new("Weld")
  26. W.Part0 = g.Middle
  27. W.Part1 = C[i]
  28. local CJ = CFrame.new(g.Middle.Position)
  29. local C0 = g.Middle.CFrame:inverse()*CJ
  30. local C1 = C[i].CFrame:inverse()*CJ
  31. W.C0 = C0
  32. W.C1 = C1
  33. W.Parent = g.Middle
  34. end
  35. local Y = Instance.new("Weld")
  36. Y.Part0 = Char.Torso
  37. Y.Part1 = g.Middle
  38. Y.C0 = CFrame.new(0, 0, 0)
  39. Y.Parent = Y.Part0
  40. end
  41.  
  42. local h = g:GetChildren()
  43. for i = 1, # h do
  44. h[i].Anchored = false
  45. h[i].CanCollide = false
  46. end
  47.  
  48.  
  49.  
  50. end
  51. -----------------------------------------------------------------------------------------------------------------------------------------
  52. if Char:findFirstChild("Humanoid") ~= nil and Char:findFirstChild("RightGun") == nil then
  53. local APModel = game.ReplicatedStorage.Equipment.APModel
  54. local RightArm = Char["Right Arm"]
  55. local g = APModel.RightGun:clone()
  56. g.Parent = Char
  57. local C = g:GetChildren()
  58. g.Middle.Transparency = 1
  59. for i=1, #C do
  60. if C[i].className == "Part" or C[i].className == "WedgePart" or C[i].className == "UnionOperation" or C[i].className == "MeshPart" then
  61. local W = Instance.new("Weld")
  62. W.Part0 = g.Middle
  63. W.Part1 = C[i]
  64. local CJ = CFrame.new(g.Middle.Position)
  65. local C0 = g.Middle.CFrame:inverse()*CJ
  66. local C1 = C[i].CFrame:inverse()*CJ
  67. W.C0 = C0
  68. W.C1 = C1
  69. W.Parent = g.Middle
  70. end
  71. local Y = Instance.new("Weld")
  72. Y.Part0 = Char["Right Arm"]
  73. Y.Part1 = g.Middle
  74. Y.C0 = CFrame.new(0, 0, 0)
  75. Y.Parent = Y.Part0
  76. end
  77.  
  78. local h = g:GetChildren()
  79. for i = 1, # h do
  80. h[i].Anchored = false
  81. h[i].CanCollide = false
  82. end
  83.  
  84. end
  85. -----------------------------------------------------------------------------------------------------------------------------------------
  86. if Char:findFirstChild("Humanoid") ~= nil and Char:findFirstChild("LeftGun") == nil then
  87. local APModel = game.ReplicatedStorage.Equipment.APModel
  88. local RightArm = Char["Left Arm"]
  89. local g = APModel.LeftGun:clone()
  90. g.Parent = Char
  91. local C = g:GetChildren()
  92. g.Middle.Transparency = 1
  93. for i=1, #C do
  94. if C[i].className == "Part" or C[i].className == "WedgePart" or C[i].className == "UnionOperation" or C[i].className == "MeshPart" then
  95. local W = Instance.new("Weld")
  96. W.Part0 = g.Middle
  97. W.Part1 = C[i]
  98. local CJ = CFrame.new(g.Middle.Position)
  99. local C0 = g.Middle.CFrame:inverse()*CJ
  100. local C1 = C[i].CFrame:inverse()*CJ
  101. W.C0 = C0
  102. W.C1 = C1
  103. W.Parent = g.Middle
  104. end
  105. local Y = Instance.new("Weld")
  106. Y.Part0 = Char["Left Arm"]
  107. Y.Part1 = g.Middle
  108. Y.C0 = CFrame.new(0, 0, 0)
  109. Y.Parent = Y.Part0
  110. end
  111.  
  112. local h = g:GetChildren()
  113. for i = 1, # h do
  114. h[i].Anchored = false
  115. h[i].CanCollide = false
  116. end
  117.  
  118. end
  119. -----------------------------------------------------------------------------------------
  120. if Char:findFirstChild("Humanoid") ~= nil and Char:findFirstChild("LeftAmmo") == nil then
  121. local APModel = game.ReplicatedStorage.Equipment.APModel
  122. local RightArm = Char["Left Leg"]
  123. local g = APModel.LeftAmmo:clone()
  124. g.Parent = Char
  125. local C = g:GetChildren()
  126. g.Middle.Transparency = 1
  127. for i=1, #C do
  128. if C[i].className == "Part" or C[i].className == "WedgePart" or C[i].className == "UnionOperation" or C[i].className == "MeshPart" then
  129. local W = Instance.new("Weld")
  130. W.Part0 = g.Middle
  131. W.Part1 = C[i]
  132. local CJ = CFrame.new(g.Middle.Position)
  133. local C0 = g.Middle.CFrame:inverse()*CJ
  134. local C1 = C[i].CFrame:inverse()*CJ
  135. W.C0 = C0
  136. W.C1 = C1
  137. W.Parent = g.Middle
  138. end
  139. local Y = Instance.new("Weld")
  140. Y.Part0 = Char["Left Leg"]
  141. Y.Part1 = g.Middle
  142. Y.C0 = CFrame.new(0, 0, 0)
  143. Y.Parent = Y.Part0
  144. end
  145.  
  146. local h = g:GetChildren()
  147. for i = 1, # h do
  148. h[i].Anchored = false
  149. h[i].CanCollide = false
  150. end
  151.  
  152. end
  153. -----------------------------------------------------------------------------------------
  154. if Char:findFirstChild("Humanoid") ~= nil and Char:findFirstChild("RightAmmo") == nil then
  155. local APModel = game.ReplicatedStorage.Equipment.APModel
  156. local RightArm = Char["Right Leg"]
  157. local g = APModel.RightAmmo:clone()
  158. g.Parent = Char
  159. local C = g:GetChildren()
  160. g.Middle.Transparency = 1
  161. for i=1, #C do
  162. if C[i].className == "Part" or C[i].className == "WedgePart" or C[i].className == "UnionOperation" or C[i].className == "MeshPart" then
  163. local W = Instance.new("Weld")
  164. W.Part0 = g.Middle
  165. W.Part1 = C[i]
  166. local CJ = CFrame.new(g.Middle.Position)
  167. local C0 = g.Middle.CFrame:inverse()*CJ
  168. local C1 = C[i].CFrame:inverse()*CJ
  169. W.C0 = C0
  170. W.C1 = C1
  171. W.Parent = g.Middle
  172. end
  173. local Y = Instance.new("Weld")
  174. Y.Part0 = Char["Right Leg"]
  175. Y.Part1 = g.Middle
  176. Y.C0 = CFrame.new(0, 0, 0)
  177. Y.Parent = Y.Part0
  178. end
  179.  
  180. local h = g:GetChildren()
  181. for i = 1, # h do
  182. h[i].Anchored = false
  183. h[i].CanCollide = false
  184. end
  185.  
  186.  
  187.  
  188. Char.Animate.idle.Animation1.AnimationId = "rbxassetid://04187286257"
  189. Char.Animate.idle.Animation2.AnimationId = "rbxassetid://04187286257"
  190. Char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://4359115738"
  191.  
  192. Char.Animate.Disabled = true
  193. wait(0.1)
  194. Char.Animate.Disabled = false
  195.  
  196. end
  197. end
  198.  
  199. onTouched()
  200.  
  201.  
  202. Replicated.Equipment.APModel.APScript:Clone().Parent = Player.Backpack
  203. Replicated.Equipment.APModel.SprintScript:Clone().Parent = Player.Backpack
  204.  
  205. --//UnEquip\\--
  206.  
  207. elseif Debounce == true then
  208. Debounce = false
  209. local Char = Player.Character
  210.  
  211. Char:FindFirstChild("RightAmmo"):Destroy()
  212. Char:FindFirstChild("LeftAmmo"):Destroy()
  213. Char:FindFirstChild("RightGun"):Destroy()
  214. Char:FindFirstChild("LeftGun"):Destroy()
  215. Char:FindFirstChild("Chest"):Destroy()
  216.  
  217. Player.Backpack:FindFirstChild("APScript"):Destroy()
  218. Player.Backpack:FindFirstChild("SprintScript"):Destroy()
  219.  
  220. if Char:findFirstChild("Humanoid") ~= nil and Char:findFirstChild("Right Grapple") then
  221. Char:FindFirstChild("Right Grapple"):Destroy()
  222. end
  223.  
  224. for i,v in pairs(Char:GetChildren()) do
  225. if v:IsA("BoolValue") then
  226. if v.Name == "Right Grapple" or v.Name == "Left Grapple" then
  227. v:Destroy()
  228. end
  229. end
  230. end
  231.  
  232.  
  233. Char.Animate.idle.Animation1.AnimationId = "rbxassetid://180435571"
  234. Char.Animate.idle.Animation2.AnimationId = "rbxassetid://180435792"
  235. Char.Animate.walk.WalkAnim.AnimationId = "rbxassetid://180426354"
  236.  
  237. Char.Animate.Disabled = true
  238. wait(0.1)
  239. Char.Animate.Disabled = false
  240.  
  241.  
  242.  
  243. end
  244. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement