Advertisement
Mr-Shadow_Cat

Glock

Dec 3rd, 2017
708
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.73 KB | None | 0 0
  1. wait(1)
  2. ---------------------------[[[ VARIABLES ]]]---------------------------
  3.  
  4. local plr = game.Players.LocalPlayer
  5. local chr = plr.Character
  6. local mou = plr:GetMouse()
  7. local leftarm = false
  8. local active = false
  9. local curkey = "f"
  10. local stunneds = {}
  11.  
  12. local Music = Instance.new("Sound")
  13.  
  14. Music.Name = "Sound"
  15. Music.SoundId = "http://roblox.com/asset/?id=236786841"
  16. Music.Volume = 8
  17. Music.Looped = true
  18. Music.Parent = Torso
  19. Music:play()
  20. ---------------------------[[[ PARTS ]]]---------------------------
  21.  
  22. -- 1 - Glock
  23. obj1 = Instance.new("Model")
  24. obj1.Name = "Glock"
  25. obj1.Parent = chr
  26.  
  27. -- 2 - Part
  28. obj2 = Instance.new("Part")
  29. obj2.CFrame = CFrame.new(Vector3.new(14.25, 3.51428652, 46.8584824)) * CFrame.Angles(0.69812995195389, 0, -0)
  30. obj2.TopSurface = Enum.SurfaceType.Smooth
  31. obj2.BottomSurface = Enum.SurfaceType.Smooth
  32. obj2.Material = Enum.Material.Metal
  33. obj2.Size = Vector3.new(0.300000012, 0.200000003, 0.200000003)
  34. obj2.Anchored = true
  35. obj2.BrickColor = BrickColor.new("Olive")
  36. obj2.Friction = 0.30000001192093
  37. obj2.Shape = Enum.PartType.Block
  38. obj2.CanCollide = false
  39. obj2.Parent = obj1
  40.  
  41. -- 3 - Top
  42. obj3 = Instance.new("Part")
  43. obj3.CFrame = CFrame.new(Vector3.new(14.25, 3.8499999, 47.1499977)) * CFrame.Angles(-0, 0, -0)
  44. obj3.TopSurface = Enum.SurfaceType.Smooth
  45. obj3.BottomSurface = Enum.SurfaceType.Smooth
  46. obj3.Material = Enum.Material.Metal
  47. obj3.Size = Vector3.new(0.300000012, 0.300000012, 1.5)
  48. obj3.Anchored = true
  49. obj3.BrickColor = BrickColor.new("Grey")
  50. obj3.Friction = 0.30000001192093
  51. obj3.Shape = Enum.PartType.Block
  52. obj3.CanCollide = false
  53. obj3.Name = "Top"
  54. obj3.Parent = obj1
  55.  
  56. -- 4 - Top
  57. obj4 = Instance.new("Part")
  58. obj4.CFrame = CFrame.new(Vector3.new(14.25, 3.8499999, 47.8999977)) * CFrame.Angles(0, 1.5707963705063, 0)
  59. obj4.TopSurface = Enum.SurfaceType.Smooth
  60. obj4.BottomSurface = Enum.SurfaceType.Smooth
  61. obj4.Material = Enum.Material.Metal
  62. obj4.Size = Vector3.new(0.200000003, 0.299999982, 0.300000012)
  63. obj4.Anchored = true
  64. obj4.BrickColor = BrickColor.new("Grey")
  65. obj4.Friction = 0.30000001192093
  66. obj4.Shape = Enum.PartType.Cylinder
  67. obj4.Name = "Top"
  68. obj4.CanCollide = false
  69. obj4.Parent = obj1
  70.  
  71. -- 5 - Part
  72. obj5 = Instance.new("Part")
  73. obj5.CFrame = CFrame.new(Vector3.new(14.25, 3.35359001, 47.1499939)) * CFrame.Angles(-1.5707978010178, 0, -0)
  74. obj5.TopSurface = Enum.SurfaceType.Smooth
  75. obj5.BottomSurface = Enum.SurfaceType.Smooth
  76. obj5.Material = Enum.Material.Metal
  77. obj5.Size = Vector3.new(0.300000012, 0.200000003, 0.299999982)
  78. obj5.Anchored = true
  79. obj5.BrickColor = BrickColor.new("Olive")
  80. obj5.Friction = 0.30000001192093
  81. obj5.Shape = Enum.PartType.Block
  82. obj5.CanCollide = false
  83. obj5.Parent = obj1
  84.  
  85. -- 6 - Part
  86. obj6 = Instance.new("Part")
  87. obj6.CFrame = CFrame.new(Vector3.new(14.25, 3.5999999, 47.1499977)) * CFrame.Angles(-0, 0, -0)
  88. obj6.TopSurface = Enum.SurfaceType.Smooth
  89. obj6.BottomSurface = Enum.SurfaceType.Smooth
  90. obj6.Material = Enum.Material.Metal
  91. obj6.Size = Vector3.new(0.300000012, 0.200000003, 1.5)
  92. obj6.Anchored = true
  93. obj6.BrickColor = BrickColor.new("Olive")
  94. obj6.CanCollide = false
  95. obj6.Friction = 0.30000001192093
  96. obj6.Shape = Enum.PartType.Block
  97. obj6.Parent = obj1
  98.  
  99. -- 7 - Part
  100. obj7 = Instance.new("Part")
  101. obj7.CFrame = CFrame.new(Vector3.new(14.25, 3.60000014, 47.8999977)) * CFrame.Angles(0, 1.5707963705063, 0)
  102. obj7.TopSurface = Enum.SurfaceType.Smooth
  103. obj7.BottomSurface = Enum.SurfaceType.Smooth
  104. obj7.Material = Enum.Material.Metal
  105. obj7.Size = Vector3.new(0.200000003, 0.200000003, 0.300000012)
  106. obj7.Anchored = true
  107. obj7.BrickColor = BrickColor.new("Olive")
  108. obj7.CanCollide = false
  109. obj7.Friction = 0.30000001192093
  110. obj7.Shape = Enum.PartType.Cylinder
  111. obj7.Parent = obj1
  112.  
  113. -- 8 - Part
  114. obj8 = Instance.new("Part")
  115. obj8.CFrame = CFrame.new(Vector3.new(14.25, 3.15358996, 46.8499985)) * CFrame.Angles(1.1920913323138e-007, 0, -0)
  116. obj8.TopSurface = Enum.SurfaceType.Smooth
  117. obj8.BottomSurface = Enum.SurfaceType.Smooth
  118. obj8.Material = Enum.Material.Metal
  119. obj8.Size = Vector3.new(0.300000012, 0.200000003, 0.699999988)
  120. obj8.Anchored = true
  121. obj8.BrickColor = BrickColor.new("Olive")
  122. obj8.Friction = 0.30000001192093
  123. obj8.CanCollide = false
  124. obj8.Shape = Enum.PartType.Block
  125. obj8.Parent = obj1
  126.  
  127. -- 9 - Part
  128. obj9 = Instance.new("Part")
  129. obj9.CFrame = CFrame.new(Vector3.new(14.25, 3.27858996, 46.5067024)) * CFrame.Angles(-1.0471963882446, 0, -0)
  130. obj9.TopSurface = Enum.SurfaceType.Smooth
  131. obj9.BottomSurface = Enum.SurfaceType.Smooth
  132. obj9.Material = Enum.Material.Metal
  133. obj9.Size = Vector3.new(0.300000012, 0.300000012, 0.699999988)
  134. obj9.Anchored = true
  135. obj9.BrickColor = BrickColor.new("Olive")
  136. obj9.CanCollide = false
  137. obj9.Friction = 0.30000001192093
  138. obj9.Shape = Enum.PartType.Block
  139. obj9.Parent = obj1
  140.  
  141. local previous = nil
  142. for i,v in pairs(obj1:GetChildren()) do
  143. if v:IsA('BasePart') then
  144. if previous then
  145. local weld = Instance.new('Weld',v)
  146. weld.Part0 = v
  147. weld.Part1 = previous
  148. weld.C0 = v.CFrame:inverse() * previous.CFrame
  149. previous.Anchored = false
  150. end
  151. previous = v
  152. end
  153. end
  154. previous.Anchored = false
  155.  
  156. ---------------------------[[[ FUNCTIONS ]]]---------------------------
  157.  
  158. function notify(msg,forever)
  159. local doit = coroutine.wrap(function()
  160. for i,v in pairs(plr.PlayerGui:GetChildren()) do
  161. if v.Name == "Notification" and v:IsA('ScreenGui') then
  162. v:Destroy()
  163. end
  164. end
  165. local gui = Instance.new('ScreenGui',plr.PlayerGui)
  166. gui.Name = "Notification"
  167. local frame = Instance.new('Frame',gui)
  168. frame.Position = UDim2.new(0,0,0,0)
  169. frame.Size = UDim2.new(1,0,0.2,0)
  170. frame.BackgroundTransparency = 1
  171. local txt = Instance.new('TextLabel',frame)
  172. txt.TextColor3 = Color3.new(255,255,255)
  173. txt.TextStrokeColor3 = Color3.new(0, 0, 0)
  174. txt.TextStrokeTransparency = 0
  175. txt.BackgroundTransparency = 1
  176. txt.Text = ""
  177. txt.Size = UDim2.new(1,0,0.3,0)
  178. txt.Position = UDim2.new(0,0,0.4,0)
  179. txt.TextScaled = true
  180. txt.Font = "Code"
  181. txt.TextXAlignment = "Center"
  182. local tap = Instance.new("Sound")
  183. tap.Parent = plr.Backpack
  184. tap.SoundId = "rbxassetid://147982968"
  185. tap.TimePosition = 0.1
  186. local str = msg
  187. local len = string.len(str)
  188. for i=1,len do
  189. txt.Text = string.sub(str,1,i)
  190. local pitche = math.random(2, 4)
  191. tap.PlaybackSpeed = pitche
  192. tap:Play()
  193. wait(0.05)
  194. end
  195. if forever == false then
  196. wait(1)
  197. while txt.TextTransparency < 1 do
  198. txt.TextTransparency = txt.TextTransparency + 0.1
  199. txt.TextStrokeTransparency = txt.TextStrokeTransparency + 0.1
  200. wait()
  201. end
  202. gui:Destroy()
  203. end
  204. end)
  205. doit()
  206. end
  207.  
  208.  
  209.  
  210. function damage(playa,hita)
  211. local hitz = hita.Name
  212. local heyy = hitz
  213. if hitz == "Right Arm" then
  214. local Limb = playa:FindFirstChild("Right Arm")
  215. local ters = playa:FindFirstChild('Torso')
  216. if Limb and ters then
  217. if ters:FindFirstChild('Right Shoulder') then ters["Right Shoulder"]:Destroy() end
  218. for i,v in pairs(Limb:GetChildren()) do
  219. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  220. v:Destroy()
  221. end
  222. end
  223. Limb.CFrame = ters.CFrame * CFrame.new(1.5, 0, 0)
  224. local Joint = Instance.new("Glue")
  225. Joint.Name = "RightShoulder"
  226. Joint.Part0 = ters
  227. Joint.Part1 = Limb
  228. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  229. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  230. Joint.Parent = ters
  231.  
  232. local B = Instance.new("Part")
  233. B.TopSurface = 0
  234. B.BottomSurface = 0
  235. B.formFactor = "Symmetric"
  236. B.Size = Vector3.new(1, 1, 1)
  237. B.Transparency = 1
  238. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  239. B.Parent = playa
  240. local W = Instance.new("Weld")
  241. W.Part0 = Limb
  242. W.Part1 = B
  243. W.C0 = CFrame.new(0, -0.5, 0)
  244. W.Parent = Limb
  245. end
  246. elseif hitz == "Left Arm" then
  247. local Limb = playa:FindFirstChild("Left Arm")
  248. local ters = playa:FindFirstChild('Torso')
  249. if Limb and ters then
  250. if ters:FindFirstChild('Left Shoulder') then ters["Left Shoulder"]:Destroy() end
  251. for i,v in pairs(Limb:GetChildren()) do
  252. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  253. v:Destroy()
  254. end
  255. end
  256. Limb.CFrame = ters.CFrame * CFrame.new(-1.5, 0, 0)
  257. local Joint = Instance.new("Glue")
  258. Joint.Name = "LeftShoulder"
  259. Joint.Part0 = ters
  260. Joint.Part1 = Limb
  261. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  262. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  263. Joint.Parent = ters
  264. local B = Instance.new("Part")
  265. B.TopSurface = 0
  266. B.BottomSurface = 0
  267. B.formFactor = "Symmetric"
  268. B.Size = Vector3.new(1, 1, 1)
  269. B.Transparency = 1
  270. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  271. B.Parent = playa
  272. local W = Instance.new("Weld")
  273. W.Part0 = ters
  274. W.Part1 = B
  275. W.C0 = CFrame.new(0, -0.5, 0)
  276. W.Parent = Limb
  277. end
  278. elseif hitz == "Right Leg" then
  279. local Limb = playa:FindFirstChild("Right Leg")
  280. local ters = playa:FindFirstChild('Torso')
  281. if Limb and ters then
  282. if ters:FindFirstChild('Right Hip') then ters["Right Hip"]:Destroy() end
  283. for i,v in pairs(Limb:GetChildren()) do
  284. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  285. v:Destroy()
  286. end
  287. end
  288. Limb.CFrame = ters.CFrame * CFrame.new(0.5, -2, 0)
  289. local Joint = Instance.new("Glue")
  290. Joint.Name = "Right Hip"
  291. Joint.Part0 = ters
  292. Joint.Part1 = Limb
  293. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  294. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  295. Joint.Parent = ters
  296. local B = Instance.new("Part")
  297. B.TopSurface = 0
  298. B.BottomSurface = 0
  299. B.formFactor = "Symmetric"
  300. B.Size = Vector3.new(1, 1, 1)
  301. B.Transparency = 1
  302. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  303. B.Parent = playa
  304. local W = Instance.new("Weld")
  305. W.Part0 = Limb
  306. W.Part1 = B
  307. W.C0 = CFrame.new(0, -0.5, 0)
  308. W.Parent = Limb
  309. if playa:FindFirstChildOfClass('Humanoid') then
  310. local hum = playa:FindFirstChildOfClass('Humanoid')
  311. local target = playa
  312. if target:FindFirstChild('HumanoidRootPart') then
  313. target.HumanoidRootPart:Destroy()
  314. end
  315. local found = false
  316. for i,v in pairs(stunneds) do
  317. if v == hum then
  318. found = true
  319. end
  320. end
  321. if found == false then
  322. table.insert(stunneds,hum)
  323. end
  324. end
  325. end
  326. elseif hitz == "Left Leg" then
  327. local Limb = playa:FindFirstChild("Left Leg")
  328. local ters = playa:FindFirstChild('Torso')
  329. if Limb and ters then
  330. if ters:FindFirstChild('Left Hip') then ters["Left Hip"]:Destroy() end
  331. for i,v in pairs(Limb:GetChildren()) do
  332. if v:IsA('Weld') or v:IsA('Motor6D') or v:IsA('Glue') then
  333. v:Destroy()
  334. end
  335. end
  336. Limb.CFrame = ters.CFrame * CFrame.new(0.5, -2, 0)
  337. Limb.CFrame = ters.CFrame * CFrame.new(-0.5, -2, 0)
  338. local Joint = Instance.new("Glue")
  339. Joint.Name = "LeftHip"
  340. Joint.Part0 = ters
  341. Joint.Part1 = Limb
  342. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  343. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  344. Joint.Parent = ters
  345.  
  346. local B = Instance.new("Part")
  347. B.TopSurface = 0
  348. B.BottomSurface = 0
  349. B.formFactor = "Symmetric"
  350. B.Size = Vector3.new(1, 1, 1)
  351. B.Transparency = 1
  352. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  353. B.Parent = playa
  354. local W = Instance.new("Weld")
  355. W.Part0 = Limb
  356. W.Part1 = B
  357. W.C0 = CFrame.new(0, -0.5, 0)
  358. W.Parent = Limb
  359. Limb.CanCollide = false
  360. if playa:FindFirstChildOfClass('Humanoid') then
  361. local hum = playa:FindFirstChildOfClass('Humanoid')
  362. local target = playa
  363. if target:FindFirstChild('HumanoidRootPart') then
  364. target.HumanoidRootPart:Destroy()
  365. end
  366. local found = false
  367. for i,v in pairs(stunneds) do
  368. if v == hum then
  369. found = true
  370. end
  371. end
  372. if found == false then
  373. table.insert(stunneds,hum)
  374. end
  375. end
  376. end
  377. else
  378. local playa2 = playa
  379. playa.Archivable = true
  380. local playa = playa:Clone()
  381. playa.Archivable = false
  382. playa2:Destroy()
  383. playa.Parent = workspace
  384. local Gibs = game.Workspace
  385. print(playa)
  386. local Torso = playa.Torso
  387. local Head = playa:FindFirstChild("Head")
  388. local function Scan(ch)
  389. local e
  390. for e = 1,#ch do
  391. Scan(ch[e]:GetChildren())
  392. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  393. ch[e]:remove()
  394. end
  395. end
  396. end
  397. Scan(playa:GetChildren())
  398. if playa:FindFirstChild('HumanoidRootPart') then
  399. playa:FindFirstChild('HumanoidRootPart'):Destroy()
  400. end
  401. local hum2 = playa:FindFirstChildOfClass("Humanoid")
  402.  
  403.  
  404. if hum2 ~= nil then
  405. hum2.Name = "Humanoid2"
  406. hum2.PlatformStand = true
  407. hum2.Health = 0
  408. end
  409. local ch = playa:GetChildren()
  410. local i
  411. for i = 1,#ch do
  412. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  413. ch[i]:remove()
  414. end
  415. end
  416.  
  417. if Head then
  418. local Neck = Instance.new("Weld")
  419. Neck.Name = "Neck"
  420. Neck.Part0 = Torso
  421. Neck.Part1 = Head
  422. Neck.C0 = CFrame.new(0, 1.5, 0)
  423. Neck.C1 = CFrame.new()
  424. Neck.Parent = Torso
  425. end
  426. local Limb = playa:FindFirstChild("Right Arm")
  427. if Limb then
  428.  
  429. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  430. local Joint = Instance.new("Glue")
  431. Joint.Name = "RightShoulder"
  432. Joint.Part0 = Torso
  433. Joint.Part1 = Limb
  434. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  435. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  436. Joint.Parent = Torso
  437.  
  438. local B = Instance.new("Part")
  439. B.TopSurface = 0
  440. B.BottomSurface = 0
  441. B.formFactor = "Symmetric"
  442. B.Size = Vector3.new(1, 1, 1)
  443. B.Transparency = 1
  444. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  445. B.Parent = playa
  446. local W = Instance.new("Weld")
  447. W.Part0 = Limb
  448. W.Part1 = B
  449. W.C0 = CFrame.new(0, -0.5, 0)
  450. W.Parent = Limb
  451. end
  452. local Limb = playa:FindFirstChild("Left Arm")
  453. if Limb then
  454.  
  455. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  456. local Joint = Instance.new("Glue")
  457. Joint.Name = "LeftShoulder"
  458. Joint.Part0 = Torso
  459. Joint.Part1 = Limb
  460. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  461. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  462. Joint.Parent = Torso
  463.  
  464. local B = Instance.new("Part")
  465. B.TopSurface = 0
  466. B.BottomSurface = 0
  467. B.formFactor = "Symmetric"
  468. B.Size = Vector3.new(1, 1, 1)
  469. B.Transparency = 1
  470. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  471. B.Parent = playa
  472. local W = Instance.new("Weld")
  473. W.Part0 = Limb
  474. W.Part1 = B
  475. W.C0 = CFrame.new(0, -0.5, 0)
  476. W.Parent = Limb
  477. end
  478. local Limb = playa:FindFirstChild("Right Leg")
  479. if Limb then
  480.  
  481. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  482. local Joint = Instance.new("Glue")
  483. Joint.Name = "RightHip"
  484. Joint.Part0 = Torso
  485. Joint.Part1 = Limb
  486. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  487. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  488. Joint.Parent = Torso
  489.  
  490. local B = Instance.new("Part")
  491. B.TopSurface = 0
  492. B.BottomSurface = 0
  493. B.formFactor = "Symmetric"
  494. B.Size = Vector3.new(1, 1, 1)
  495. B.Transparency = 1
  496. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  497. B.Parent = playa
  498. local W = Instance.new("Weld")
  499. W.Part0 = Limb
  500. W.Part1 = B
  501. W.C0 = CFrame.new(0, -0.5, 0)
  502. W.Parent = Limb
  503. end
  504. local Limb = playa:FindFirstChild("Left Leg")
  505. if Limb then
  506.  
  507. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  508. local Joint = Instance.new("Glue")
  509. Joint.Name = "LeftHip"
  510. Joint.Part0 = Torso
  511. Joint.Part1 = Limb
  512. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  513. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  514. Joint.Parent = Torso
  515.  
  516. local B = Instance.new("Part")
  517. B.TopSurface = 0
  518. B.BottomSurface = 0
  519. B.formFactor = "Symmetric"
  520. B.Size = Vector3.new(1, 1, 1)
  521. B.Transparency = 1
  522. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  523. B.Parent = playa
  524. local W = Instance.new("Weld")
  525. W.Part0 = Limb
  526. W.Part1 = B
  527. W.C0 = CFrame.new(0, -0.5, 0)
  528. W.Parent = Limb
  529. end
  530. --[
  531. local Bar = Instance.new("Part")
  532. Bar.TopSurface = 0
  533. Bar.BottomSurface = 0
  534. Bar.formFactor = "Symmetric"
  535. Bar.Size = Vector3.new(1, 1, 1)
  536. Bar.Transparency = 1
  537. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  538. Bar.Parent = playa
  539. local Weld = Instance.new("Weld")
  540. Weld.Part0 = Torso
  541. Weld.Part1 = Bar
  542. Weld.C0 = CFrame.new(0, 0.5, 0)
  543. Weld.Parent = Torso
  544. --]]
  545. playa.Parent = Gibs
  546. game.Debris:AddItem(playa, 12)
  547. end
  548. end
  549.  
  550.  
  551. function calculate()
  552. if leftarm and chr:FindFirstChild('Head') and chr:FindFirstChild('Torso') and chr.Torso:FindFirstChild("Left Shoulder") and chr:FindFirstChild('Left Arm') then
  553. local Head = plr.Character.Head
  554. local RightShoulder = plr.Character.Torso["Left Shoulder"]
  555. local RightArm = plr.Character["Left Arm"]
  556. local MousePosition = mou.Hit.p
  557. local ToMouse = (MousePosition - Head.Position).unit
  558. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  559. local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((-Head.Size.X / 2) + (-RightArm.Size.X / 2)), ((-Head.Size.Y / 2) - (-RightArm.Size.Z / 2)), 0)))
  560. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(-1 ,0, -1)).unit
  561. local Look = (Head.CFrame.lookVector * Vector3.new(-1, 0, -1)).unit
  562. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  563. if tostring(LateralAngle) == "-1.#IND" then
  564. LateralAngle = 0
  565. end
  566. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  567. --[[
  568. if LateralAngle > (math.pi / 2) then
  569. LateralAngle = (math.pi / 2)
  570. if chr:FindFirstChild('Torso') then
  571. local Torso = chr.Torso
  572. local Point = Torso.CFrame:vectorToObjectSpace(mou.Hit.p-Torso.CFrame.p)
  573. if Point.Z > 0 then
  574. if Point.X > 0 then
  575. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(90),0)
  576. elseif Point.X < 0 then
  577. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(-90),0)
  578. end
  579. end
  580. end
  581. end
  582. ]]--
  583. print(LateralAngle)
  584. warn(math.pi / 2)
  585. if Cross.Y < 0 then
  586. LateralAngle = -LateralAngle
  587. end
  588. return(CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
  589. elseif chr:FindFirstChild('Head') and chr:FindFirstChild('Torso') and chr.Torso:FindFirstChild("Right Shoulder") and chr:FindFirstChild('Right Arm') then
  590. local Head = plr.Character.Head
  591. local RightShoulder = plr.Character.Torso["Right Shoulder"]
  592. local RightArm = plr.Character["Right Arm"]
  593. local MousePosition = mou.Hit.p
  594. local ToMouse = (MousePosition - Head.Position).unit
  595. local Angle = math.acos(ToMouse:Dot(Vector3.new(0, 1, 0)))
  596. local FromRightArmPos = (Head.Position + Head.CFrame:vectorToWorldSpace(Vector3.new(((Head.Size.X / 2) + (RightArm.Size.X / 2)), ((Head.Size.Y / 2) - (RightArm.Size.Z / 2)), 0)))
  597. local ToMouseRightArm = ((MousePosition - FromRightArmPos) * Vector3.new(1 ,0, 1)).unit
  598. local Look = (Head.CFrame.lookVector * Vector3.new(1, 0, 1)).unit
  599. local LateralAngle = math.acos(ToMouseRightArm:Dot(Look))
  600. if tostring(LateralAngle) == "-1.#IND" then
  601. LateralAngle = 0
  602. end
  603. local Cross = Head.CFrame.lookVector:Cross(ToMouseRightArm)
  604. if LateralAngle > (math.pi / 2) then
  605. LateralAngle = (math.pi / 2)
  606. if chr:FindFirstChild('Torso') then
  607. local Torso = chr.Torso
  608. local Point = Torso.CFrame:vectorToObjectSpace(mou.Hit.p-Torso.CFrame.p)
  609. if Point.Z > 0 then
  610. if Point.X > 0 then
  611. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(90),0)
  612. elseif Point.X < 0 then
  613. Torso.CFrame = CFrame.new(Torso.Position,Vector3.new(mou.Hit.X,Torso.Position.Y,mou.Hit.Z))*CFrame.Angles(0,math.rad(-90),0)
  614. end
  615. end
  616. end
  617. end
  618. if Cross.Y < 0 then
  619. LateralAngle = -LateralAngle
  620. end
  621. return(CFrame.new(RightShoulder.C0.p) * CFrame.Angles(((math.pi / 2) - Angle), ((math.pi / 2) + LateralAngle), math.pi/2))
  622. end
  623. end
  624.  
  625. function fire()
  626. if mou.Target then
  627. local humanoid = mou.Target.Parent:FindFirstChildOfClass("Humanoid")
  628. if not humanoid then
  629. humanoid = mou.Target.Parent.Parent:FindFirstChildOfClass("Humanoid")
  630. end
  631. if humanoid then
  632. local coru = coroutine.wrap(function()
  633. damage(humanoid.Parent,mou.Target)
  634. end)
  635. coru()
  636. end
  637. end
  638. local beam = Instance.new("Part", workspace)
  639. beam.BrickColor = BrickColor.new("New Yeller")
  640. beam.FormFactor = "Custom"
  641. beam.Material = "Neon"
  642. beam.Transparency = 0.25
  643. beam.Anchored = true
  644. beam.Locked = true
  645. beam.CanCollide = false
  646. local distance = (obj4.CFrame.p - mou.Hit.p).magnitude
  647. beam.Size = Vector3.new(0.2, 0.2, distance)
  648. beam.CFrame = CFrame.new(obj4.CFrame.p, mou.Hit.p) * CFrame.new(0, 0, -distance / 2)
  649. game:GetService("Debris"):AddItem(beam, 0.05)
  650. local sound = Instance.new('Sound',obj4)
  651. sound.SoundId = 'rbxassetid://131257506'
  652. sound.Volume = 3
  653. sound.EmitterSize = 40
  654. sound.MaxDistance = 450
  655. sound:Play()
  656. game:GetService("Debris"):AddItem(beam, sound.TimeLength)
  657. end
  658.  
  659. ---------------------------[[[ SCRIPT ]]]---------------------------
  660. if chr:FindFirstChild('Left Arm') == nil or chr:FindFirstChild('Torso') == nil or chr.Torso:FindFirstChild('Left Shoulder') == nil then
  661. leftarm = false
  662. end
  663. local weldas = Instance.new('Weld',obj2)
  664. if leftarm and chr:FindFirstChild('Left Arm') then
  665. weldas.Part0 = obj2
  666. weldas.Part1 = chr["Left Arm"]
  667. weldas.C0 = CFrame.new(0,-0.85,-0.30)*CFrame.Angles(math.rad(50),math.rad(0),math.rad(180))
  668. elseif chr:FindFirstChild('Right Arm') then
  669. weldas.Part0 = obj2
  670. weldas.Part1 = chr["Right Arm"]
  671. weldas.C0 = CFrame.new(0,-0.85,-0.30)*CFrame.Angles(math.rad(50),math.rad(0),math.rad(180))
  672. end
  673.  
  674.  
  675. if leftarm and chr:FindFirstChild('Left Arm') and chr:FindFirstChild('Torso') and chr.Torso:FindFirstChild('Left Shoulder') then
  676. chr:FindFirstChild('Left Arm').AncestryChanged:connect(function(me,par)
  677. if par ~= chr and chr:FindFirstChild('Right Arm') then
  678. if obj2 and obj2:FindFirstChildOfClass('Weld') then
  679. obj2:FindFirstChildOfClass('Weld').Part1 = chr["Right Arm"]
  680. end
  681. leftarm = false
  682. end
  683. end)
  684. chr.Torso:FindFirstChild('Left Shoulder').AncestryChanged:connect(function(me,par)
  685. if par ~= chr:FindFirstChild('Torso') and chr:FindFirstChild('Right Arm') then
  686. if obj2 and obj2:FindFirstChildOfClass('Weld') then
  687. obj2:FindFirstChildOfClass('Weld').Part1 = chr["Right Arm"]
  688. end
  689. end
  690. leftarm = false
  691. end)
  692. elseif leftarm then
  693. if obj2 and obj2:FindFirstChildOfClass('Weld') and chr:FindFirstChild('Right Arm') then
  694. obj2:FindFirstChildOfClass('Weld').Part1 = chr["Right Arm"]
  695. end
  696. end
  697.  
  698. mou.KeyDown:connect(function(key)
  699. if key == string.lower(curkey) then
  700. active = not active
  701. end
  702. end)
  703.  
  704. plr.Chatted:connect(function(msg)
  705. if string.lower(string.sub(msg,1,5)) == "!bind" then
  706. curkey = string.lower(string.sub(msg,7,7))
  707. notify([[Changed key for equip/unequip to "]]..curkey..[[".]],false)
  708. end
  709. end)
  710.  
  711. game:GetService('RunService').Stepped:connect(function()
  712. if active and chr:FindFirstChild('Torso') then
  713. if leftarm then
  714. chr.Torso["Left Shoulder"].C0 = calculate()
  715. else
  716. chr.Torso["Right Shoulder"].C0 = calculate()
  717. end
  718. weldas.Part1 = chr["Right Arm"]
  719. weldas.C0 = CFrame.new(0,-0.85,-0.30)*CFrame.Angles(math.rad(50),math.rad(0),math.rad(180))
  720. elseif chr:FindFirstChild('Torso') and (chr.Torso:FindFirstChild('Left Shoulder') or chr.Torso:FindFirstChild('Right Shoulder')) then
  721. if leftarm then
  722. chr.Torso["Left Shoulder"].C0 = CFrame.new(-1,0.5,0)*CFrame.Angles(0,-math.pi/2,0)
  723. else
  724. chr.Torso["Right Shoulder"].C0 = CFrame.new(1,0.5,0)*CFrame.Angles(0,math.pi/2,0)
  725. end
  726. weldas.Part1 = chr.Torso
  727. weldas.C0 = CFrame.new(-1,0,-1)*CFrame.Angles(math.rad(-90),0,0)
  728. end
  729. for i,v in pairs(stunneds) do
  730. v.PlatformStand = true
  731. end
  732. end)
  733.  
  734. mou.Button1Down:connect(function()
  735. if active then
  736. fire()
  737. end
  738. end)
  739.  
  740. notify([[Chat "!bind [key]" to bind a different key to equip/unequip. Current key is "f".]],false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement